https://github.com/NVIDIA/DIGITS
Raw File
Tip revision: ed022de723a5c71676dc2ba5487c1334c9725b53 authored by Luke Yeager on 06 July 2015, 18:33:44 UTC
Mark v2.0.0-preview
Tip revision: ed022de
nginx.site
# DIGITS nginx site

server {
    listen 80;

    # Gunicorn server
    location / {
        proxy_pass http://127.0.0.1:8080;
        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 500M;
    }

    # Socketio
    location /socket.io {
        proxy_pass http://127.0.0.1:8080/socket.io;
        proxy_redirect off;
        proxy_buffering 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;

        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
    }

    # Static files
    # TODO: Set these locations yourself
#    location /static {
#        alias /MY_DIGITS_DIR/digits/static;
#    }
#    location /files {
#        alias /MY_JOBS_DIR;
#        autoindex on;
#        autoindex_exact_size off;
#        autoindex_localtime on;
#    }
}
back to top