MarseyWorld/nginx.conf

86 lines
1.7 KiB
Nginx Configuration File

server {
server_name localhost;
client_max_body_size 100m;
listen 80;
listen [::]:80;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $remote_addr;
location / {
proxy_pass http://localhost:5000/;
}
location /socket.io {
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass http://localhost:5001/socket.io;
}
location /chat {
proxy_pass http://localhost:5001/chat;
}
location /old_chat {
proxy_pass http://localhost:5001/old_chat;
}
location =/offline.html {
alias /d/files/templates/errors/offline.html;
}
error_page 404 = /404.html;
location =/404.html {
alias /d/files/templates/errors/rDrama/404.html;
add_header Cache-Control "no-store";
}
error_page 502 = /502.html;
location =/502.html {
alias /d/files/templates/errors/rDrama/502.html;
add_header Cache-Control "no-store";
}
location /images/ {
alias /images/;
}
location /chat_images/ {
alias /chat_images/;
}
location /videos/ {
alias /videos/;
}
location /audio/ {
alias /audio/;
}
location /songs/ {
alias /songs/;
proxy_hide_header Cache-Control;
add_header Cache-Control "max-age=2678400";
}
location /asset_submissions/ {
alias /asset_submissions/;
}
location /archives/ {
alias /archives/;
}
location /assets/ {
alias /d/files/assets/;
}
location /i/ {
alias /d/files/assets/images/;
}
location /e/ {
alias /d/files/assets/images/emojis/;
}
location =/robots.txt {
alias /d/files/assets/robots.txt;
}
location =/icon.webp {
alias /d/files/assets/images/rDrama/icon.webp;
}
location =/favicon.ico {
alias /d/files/assets/images/rDrama/icon.webp;
}
}