Skip to content

Instantly share code, notes, and snippets.

@SyNeto
Created August 16, 2018 16:56
Show Gist options
  • Save SyNeto/b3f835b71ea899bc88f858b564c8d0fc to your computer and use it in GitHub Desktop.
Save SyNeto/b3f835b71ea899bc88f858b564c8d0fc to your computer and use it in GitHub Desktop.
nginx.conf
server{
listen 80;
server_name server_ip1 server_ip2 domain.com1 domain.com2;
root /path/to/root;
index index.html;
location = /favicon.ico { access_log off; log_not_found off; }
location / {
try_files $uri /index.html =404;
}
location /static/ {
root /path/to/static/files;
}
location ~ ^/(admin|api|api-auth) {
include proxy_params;
proxy_pass http://unix:/path/to/gunicorn/socket.sock;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment