genesis
This commit is contained in:
51
nginx.simple.conf
Normal file
51
nginx.simple.conf
Normal file
@@ -0,0 +1,51 @@
|
||||
# Simple Nginx Configuration for FibDash Development
|
||||
# Place this in /etc/nginx/sites-available/fibdash-dev
|
||||
|
||||
upstream frontend {
|
||||
server 127.0.0.1:5001;
|
||||
}
|
||||
|
||||
upstream backend {
|
||||
server 127.0.0.1:5000;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost fibdash.local;
|
||||
|
||||
# Logging
|
||||
access_log /var/log/nginx/fibdash_access.log;
|
||||
error_log /var/log/nginx/fibdash_error.log;
|
||||
|
||||
# API routes
|
||||
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;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
# WebSocket support for HMR
|
||||
location /ws {
|
||||
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;
|
||||
}
|
||||
|
||||
# All other requests to frontend
|
||||
location / {
|
||||
proxy_pass http://frontend;
|
||||
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;
|
||||
|
||||
# WebSocket support for HMR
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user