Canas
9/27/2016 - 5:31 AM

Nginx configuration file as a reverse proxy front end. Can be used with gunicorn.service gist to load django applications.

Nginx configuration file as a reverse proxy front end. Can be used with gunicorn.service gist to load django applications.

server {
    listen 80;
    server_name server;

    access_log off;

    location /static {
        alias /home/user/app-name/static;
    }

    location /media {
        alias /home/user/app-name/media;
    }

    location / {
        include proxy_params;
        proxy_pass http://unix:/home/user/app-name/app-name.sock;
    }

}