51 lines
1.3 KiB
Nginx Configuration File
51 lines
1.3 KiB
Nginx Configuration File
|
server {
|
||
|
listen 8000;
|
||
|
|
||
|
access_log /dev/stdout;
|
||
|
|
||
|
gzip_static on;
|
||
|
|
||
|
server_tokens off;
|
||
|
|
||
|
set_real_ip_from 0.0.0.0/0;
|
||
|
real_ip_header X-Forwarded-For;
|
||
|
|
||
|
location / {
|
||
|
proxy_buffers 32 4k;
|
||
|
proxy_connect_timeout 240;
|
||
|
proxy_headers_hash_bucket_size 128;
|
||
|
proxy_headers_hash_max_size 1024;
|
||
|
proxy_http_version 1.1;
|
||
|
proxy_read_timeout 240;
|
||
|
proxy_redirect http:// $scheme://;
|
||
|
proxy_send_timeout 240;
|
||
|
|
||
|
proxy_set_header Host $host;
|
||
|
proxy_set_header Upgrade $http_upgrade;
|
||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
|
proxy_set_header X-Forwarded-Host $host;
|
||
|
proxy_set_header X-Forwarded-Method $request_method;
|
||
|
proxy_set_header X-Forwarded-Port $server_port;
|
||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||
|
proxy_set_header X-Forwarded-Server $host;
|
||
|
proxy_set_header X-Forwarded-Ssl on;
|
||
|
proxy_set_header X-Forwarded-Uri $request_uri;
|
||
|
proxy_set_header X-Original-Method $request_method;
|
||
|
proxy_set_header X-Original-URL $scheme://$http_host$request_uri;
|
||
|
proxy_set_header X-Real-IP $remote_addr;
|
||
|
|
||
|
proxy_pass http://localhost:8080;
|
||
|
}
|
||
|
|
||
|
location /static {
|
||
|
expires 1y;
|
||
|
add_header Cache-Control "public, immutable";
|
||
|
alias /app/collected-static;
|
||
|
}
|
||
|
|
||
|
location /media {
|
||
|
expires 1h;
|
||
|
alias /app/media;
|
||
|
}
|
||
|
}
|