Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » nginx and ImageGallery [solved]

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 2896 Views
  • taligent
    Avatar
    Community Member
    18 Posts

    nginx and ImageGallery [solved] Link to this post

    I have an install of SilverStripe 2.4.0 and have also installed swfupload, dataobjectmanager, and imagegallery. After trying to create a new Image Gallery page I get the following popup window:

    <html>
    <head><title>502 Bad Gateway</title></head>
    <body bgcolor="white">
    <center><h1>502 Bad Gateway</h1></center>
    <hr><center>nginx/0.7.65</center>
    </body>
    </html>

    I am running SilverStripe on an nginx server. Please note that this is a duplicate question to another already posted in the General Questions forum (http://www.silverstripe.org/general-questions/show/279081#post279081), but since I am not the owner of the thread I can't move it to this forum where I believe it belongs.

  • taligent
    Avatar
    Community Member
    18 Posts

    Re: nginx and ImageGallery [solved] Link to this post

    I found a fix for this problem at this page on the Rackcorp site. It has to do with increasing the fastcgi buffer size in the fastcgi_params file with nginx. However, now I am curious how big the buffer is when coming from a page created with the Image Gallery module. Finding out that information is beyond me, and if possible, I would like to ensure that my buffers are not overly large in my configuration.

    To summarize the Rackcorp article, just add the following lines to your fastcgi_params file and restart nginx.

    fastcgi_connect_timeout 60;
    fastcgi_send_timeout 180;
    fastcgi_read_timeout 180;
    fastcgi_buffer_size 128k;
    fastcgi_buffers 4 256k;
    fastcgi_busy_buffers_size 256k;
    fastcgi_temp_file_write_size 256k;
    fastcgi_intercept_errors on;

    If somebody finds smaller values that work, please let me know.

  • taligent
    Avatar
    Community Member
    18 Posts

    Re: nginx and ImageGallery [solved] Link to this post

    Well, I played around with the entries trying out values and came up with the following shorter list of configuration entry values that are much smaller than the Rackcorp values and still work. If anyone is familiar with nginx and can tell me if these are reasonable it would be great.

    fastcgi_buffer_size 32k;
    fastcgi_buffers 4 32k;
    fastcgi_busy_buffers_size 64k;

  • SSadmin
    Avatar
    Community Member
    90 Posts

    Re: nginx and ImageGallery [solved] Link to this post

    thanks for your post, i had same problem with nginx with silverstripe.. your quick fix saved my day..
    Looks like the default nginx setting wont allow big respond header with quite big content using ajax call.

    2896 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.