nyanimedb/modules/frontend/nginx-default.conf
2025-12-06 09:17:45 +03:00

48 lines
No EOL
1.3 KiB
Text

server {
listen 80;
listen [::]:80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
location /api/v1/ {
rewrite ^/api/v1/(.*)$ /$1 break;
proxy_pass http://nyanimedb-backend:8080/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location /auth/ {
rewrite ^/auth/(.*)$ /$1 break;
proxy_pass http://nyanimedb-auth:8082/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location /media/ {
rewrite ^/media/(.*)$ /$1 break;
proxy_pass http://nyanimedb-images:8000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}