2023-02-21 21:41:31 +00:00
|
|
|
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_send_timeout 240;
|
|
|
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
|
|
|
2023-02-22 09:15:44 +00:00
|
|
|
proxy_pass http://django:8080;
|
2023-02-21 21:41:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
location /static {
|
2023-11-23 13:33:19 +00:00
|
|
|
add_header Cache-Control "public, immutable, max-age=31536000";
|
2023-02-21 21:41:31 +00:00
|
|
|
alias /app/collected-static;
|
|
|
|
}
|
|
|
|
|
|
|
|
location /media {
|
2023-11-23 13:33:19 +00:00
|
|
|
add_header Cache-Control "public, immutable, max-age=3600";
|
2023-02-21 21:41:31 +00:00
|
|
|
alias /app/media;
|
|
|
|
}
|
|
|
|
}
|