mirror of
https://github.com/brian8544/turtle-wow.git
synced 2024-12-28 10:24:36 +00:00
77 lines
2.1 KiB
Nginx Configuration File
77 lines
2.1 KiB
Nginx Configuration File
server_names_hash_bucket_size 64;
|
|
|
|
server {
|
|
listen 80 default_server;
|
|
server_name _;
|
|
root /var/www/;
|
|
expires 1d;
|
|
|
|
sendfile on;
|
|
tcp_nodelay on;
|
|
tcp_nopush on;
|
|
server_tokens off;
|
|
types_hash_max_size 4096;
|
|
|
|
client_body_buffer_size 30K;
|
|
client_header_buffer_size 10k;
|
|
client_max_body_size 50m;
|
|
large_client_header_buffers 2 10k;
|
|
|
|
client_body_timeout 120;
|
|
client_header_timeout 120;
|
|
keepalive_timeout 600;
|
|
send_timeout 120;
|
|
|
|
fastcgi_send_timeout 600;
|
|
fastcgi_read_timeout 600;
|
|
proxy_connect_timeout 600;
|
|
proxy_send_timeout 600;
|
|
proxy_read_timeout 600;
|
|
|
|
open_file_cache max=2000 inactive=20s;
|
|
open_file_cache_valid 60s;
|
|
open_file_cache_min_uses 2;
|
|
open_file_cache_errors off;
|
|
|
|
location ~/model_viewer/ {
|
|
location ~/(meta|mo3|textures|viewer)/ {
|
|
add_header Access-Control-Allow-Origin "*";
|
|
try_files $uri $uri/;
|
|
}
|
|
|
|
location ~/bg.png {
|
|
add_header Access-Control-Allow-Origin "*";
|
|
try_files $uri $uri/;
|
|
}
|
|
|
|
proxy_pass http://127.0.0.1:5555;
|
|
}
|
|
|
|
location ~/uploads/ {
|
|
root /var/www/;
|
|
}
|
|
|
|
location ~* ^.+\.(jpe?g|png) {
|
|
add_header Cache-Control "public, no-transform";
|
|
add_header Vary "Accept-Encoding";
|
|
access_log off;
|
|
log_not_found off;
|
|
expires 1y;
|
|
add_header Cache-Control "public, no-transform";
|
|
}
|
|
|
|
location ~* .(jpg|jpeg|png|gif|ico|webp|css|js)$ {
|
|
access_log off;
|
|
log_not_found off;
|
|
expires 1y;
|
|
add_header Cache-Control "public";
|
|
}
|
|
|
|
location ~* \.zip {
|
|
proxy_no_cache 1;
|
|
proxy_cache_bypass 1;
|
|
}
|
|
|
|
try_files $uri $uri/ /index.html;
|
|
}
|