linklogger/nginx.conf
2024-12-02 23:52:48 -06:00

29 lines
711 B
Nginx Configuration File

server {
listen 6464;
# Serve React static files
location / {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html;
}
# Proxy API requests to FastAPI
location /api/ {
proxy_pass http://localhost:5252;
}
# Proxy short link requests to FastAPI
location /c/ {
proxy_pass http://localhost:5252;
set_real_ip_from 0.0.0.0/0;
real_ip_header X-Forwarded-For;
real_ip_recursive on;
}
# Proxy docs to FastAPI
location /docs {
proxy_pass http://localhost:5252/docs;
}
# Proxy /openapi.json to FastAPI
location /openapi.json {
proxy_pass http://localhost:5252/openapi.json;
}
}