Files
touch-programming/nginx.conf
T
2025-02-22 23:35:46 +01:00

32 lines
617 B
Nginx Configuration File

events {}
http {
upstream backend {
server 127.0.0.1:8080;
}
upstream ai {
server 127.0.0.1:11434;
}
server {
listen 80;
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html;
}
location ~* \.(?:css|js)$ {
try_files $uri/ =404;
}
location /api/ {
proxy_pass http://backend;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
}