RasKita / nginx /default.conf
GlaringOcean's picture
Create nginx/default.conf
38a1a93 verified
raw
history blame contribute delete
919 Bytes
server {
listen 7860;
server_name _;
location / {
root /app/Frontend;
try_files $uri $uri/ /index.html;
index index.html;
}
location /assets/ {
root /app/Asset;
expires 1y;
add_header Cache-Control "public, immutable";
}
location /api/ {
rewrite ^/api/(.*) /$1 break;
proxy_pass http://127.0.0.1:8000;
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 $scheme;
}
location ~ ^/(predict|health|database-info)$ {
proxy_pass http://127.0.0.1:8000;
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 $scheme;
}
}