Files
tmaker.sori.studio/frontend/nginx.conf
2026-06-23 18:46:37 +09:00

70 lines
1.9 KiB
Nginx Configuration File

server {
listen 80;
server_name _;
client_max_body_size 1024m;
root /usr/share/nginx/html;
index index.html;
location = /favicon.ico {
try_files /favicon.ico =404;
access_log off;
expires 7d;
add_header Cache-Control "public";
}
location ~ ^/(?:favicon-(?:16x16|32x32|96x96)|apple-icon-(?:57x57|60x60|72x72|76x76|114x114|120x120|144x144|152x152|180x180)|android-icon-(?:36x36|48x48|72x72|96x96|144x144|192x192)|ms-icon-(?:70x70|144x144|150x150|310x310))\.png$ {
try_files $uri =404;
access_log off;
expires 7d;
add_header Cache-Control "public";
}
location ~ ^/(?:manifest\.json|browserconfig\.xml)$ {
try_files $uri =404;
access_log off;
expires 1h;
add_header Cache-Control "public";
}
location / {
try_files $uri $uri/ /index.html;
}
location /api/ {
proxy_pass http://backend:5179/api/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
location /share/ {
proxy_pass http://backend:5179/share/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
location /uploads/ {
proxy_pass http://backend:5179/uploads/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
location /health {
proxy_pass http://backend:5179/health;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
}