2024-01-14 16:14:43 +00:00
|
|
|
proxy_cache_path /tmp/nginx_cache levels=1:2 keys_zone=nginxcache:10m max_size=150m inactive=24h;
|
2024-01-13 22:52:37 +00:00
|
|
|
|
2024-01-14 12:59:31 +00:00
|
|
|
client_body_temp_path /tmp/client_temp;
|
|
|
|
proxy_temp_path /tmp/proxy_temp_path;
|
|
|
|
fastcgi_temp_path /tmp/fastcgi_temp;
|
|
|
|
uwsgi_temp_path /tmp/uwsgi_temp;
|
|
|
|
scgi_temp_path /tmp/scgi_temp;
|
|
|
|
|
2023-02-21 21:41:31 +00:00
|
|
|
server {
|
|
|
|
listen 8000;
|
|
|
|
|
|
|
|
access_log /dev/stdout;
|
2024-01-13 22:52:37 +00:00
|
|
|
error_log /dev/stderr;
|
2023-02-21 21:41:31 +00:00
|
|
|
|
|
|
|
gzip_static on;
|
|
|
|
|
|
|
|
set_real_ip_from 0.0.0.0/0;
|
|
|
|
real_ip_header X-Forwarded-For;
|
|
|
|
|
2023-11-23 13:54:57 +00:00
|
|
|
# Override nginx's server header
|
|
|
|
more_set_headers "Server: Wouldn't you like to know";
|
|
|
|
server_tokens off;
|
|
|
|
|
2024-01-13 22:52:37 +00:00
|
|
|
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;
|
|
|
|
proxy_set_header Proxy "";
|
|
|
|
|
|
|
|
proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504;
|
|
|
|
proxy_cache_lock on;
|
|
|
|
proxy_cache_valid 404 1m;
|
2023-02-21 21:41:31 +00:00
|
|
|
|
2024-01-13 22:52:37 +00:00
|
|
|
location / {
|
2024-01-13 21:43:10 +00:00
|
|
|
proxy_pass http://localhost:8080;
|
2023-02-21 21:41:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
location /static {
|
2024-01-13 22:52:37 +00:00
|
|
|
proxy_cache nginxcache;
|
|
|
|
add_header X-Cache-Status $upstream_cache_status;
|
|
|
|
proxy_pass http://localhost:8080;
|
2023-02-21 21:41:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
location /media {
|
2024-01-13 22:52:37 +00:00
|
|
|
proxy_cache nginxcache;
|
|
|
|
add_header X-Cache-Status $upstream_cache_status;
|
|
|
|
proxy_pass http://localhost:8080;
|
2023-02-21 21:41:31 +00:00
|
|
|
}
|
|
|
|
}
|