# Nginx Configuration for PromptTech Solution Site # Port: 5300 (Frontend) and 8181 (Backend API) server { listen 5300; listen [::]:5300; server_name prompttech.dynns.com localhost; # Disable ModSecurity for this site modsecurity off; # Logs access_log /var/log/nginx/prompttech-access.log; error_log /var/log/nginx/prompttech-error.log; # Gzip Compression gzip on; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml; # Proxy to React dev server location / { proxy_pass http://127.0.0.1:5300; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; 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_cache_bypass $http_upgrade; } # API proxy to FastAPI backend location /api/ { proxy_pass http://127.0.0.1:8181; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; 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_cache_bypass $http_upgrade; # Allow large file uploads client_max_body_size 100M; # Timeouts for large uploads proxy_connect_timeout 300s; proxy_send_timeout 300s; proxy_read_timeout 300s; } }