Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (34 sloc) 846 Bytes
worker_processes 1;
events { worker_connections 1024; }
error_log /proc/self/fd/2;
pid /var/run/nginx.pid;
http {
server {
listen 4000;
return 301 https://$host$request_uri;
}
upstream app {
server localhost:8000;
}
server {
include /etc/nginx/mime.types;
listen 4001 proxy_protocol;
access_log /proc/self/fd/1;
error_log /proc/self/fd/2;
root /app;
location /static/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
location @app {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $proxy_protocol_addr;
proxy_set_header X-Forwarded-For $proxy_protocol_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_redirect off;
proxy_pass http://app;
}
try_files $uri/index.html $uri @app;
}
}