Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 50 lines (38 sloc) 1.514 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
# This is the configuration file we use to proxy nginx to zotonic.
# Replace "test.zotonic.com" with your hostname.

server {
        listen 80;
        server_name test.zotonic.com;

        access_log /var/log/nginx/test.zotonic.com.access.log;
        error_log /var/log/nginx/test.zotonic.com.error.log;

        keepalive_timeout 65;
        gzip off;

        location / {
            proxy_pass http://127.0.0.1:8000/;
            proxy_redirect off;
            
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

            client_max_body_size 50m;
            client_body_buffer_size 128k;

            proxy_connect_timeout 90;
            proxy_send_timeout 90;
            proxy_read_timeout 90;

            proxy_buffer_size 4k;
            proxy_buffers 4 32k;
            proxy_busy_buffers_size 64k;
            proxy_temp_file_write_size 64k;
        }

        location /close-connection {
             keepalive_timeout 0;
             empty_gif;
        }

# zotonic serves it's own error pages, so the ones below are not needed

        #error_page 404 /404.html;

        # redirect server error pages to the static page /50x.html
        #
        #error_page 500 502 503 504 /50x.html;
        #location = /50x.html {
        # root /var/www/nginx-default;
        #}
}
Something went wrong with that request. Please try again.