upstream sigi_app_server { server unix:/srv/interlegis/socks/sigi.sock fail_timeout=0; } server { listen 80; server_name sigi01h.interlegis.leg.br; client_max_body_size 4G; access_log /var/log/sigi/sigi-access.log; error_log /var/log/sigi/sigi-error.log; location /static/ { alias /srv/interlegis/sigi/static/; } location /media/ { alias /srv/interlegis/sigi/media/; } location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; if (!-f $request_filename) { proxy_pass http://sigi_app_server; break; } } }