first commit
This commit is contained in:
30
deploy/nginx.conf
Normal file
30
deploy/nginx.conf
Normal file
@@ -0,0 +1,30 @@
|
||||
# Nginx reverse proxy configuration for stock-data-backend
|
||||
# Domain: signal.thiessen.io → localhost:8000 (uvicorn)
|
||||
#
|
||||
# Installation:
|
||||
# sudo cp deploy/nginx.conf /etc/nginx/sites-available/stock-data-backend
|
||||
# sudo ln -s /etc/nginx/sites-available/stock-data-backend /etc/nginx/sites-enabled/
|
||||
# sudo nginx -t && sudo systemctl reload nginx
|
||||
#
|
||||
# SSL/TLS (recommended):
|
||||
# sudo apt install certbot python3-certbot-nginx
|
||||
# sudo certbot --nginx -d signal.thiessen.io
|
||||
# Certbot will automatically modify this file to add SSL directives.
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name signal.thiessen.io;
|
||||
|
||||
# Redirect all HTTP to HTTPS (uncomment after certbot setup)
|
||||
# return 301 https://$host$request_uri;
|
||||
|
||||
location / {
|
||||
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;
|
||||
proxy_read_timeout 120s;
|
||||
proxy_connect_timeout 10s;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user