PythonicRAGReact / nginx.conf
T-K-O-H
Add nginx reverse proxy and fix port conflicts
f4bdf2b
raw
history blame
844 Bytes
events {
worker_connections 1024;
}
http {
upstream frontend {
server localhost:3000;
}
upstream backend {
server localhost:8000;
}
server {
listen 7860;
server_name localhost;
location / {
proxy_pass http://frontend;
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 /api/ {
proxy_pass http://backend/;
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;
}
}
}