CoolFace
Apppublic

itsprasun/pythonic-rag-fastapi-react

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
nginx.conf48 linesDownload Raw Back to root
1worker_processes 1;2error_log /var/log/nginx/error.log warn;3pid /var/run/nginx.pid;4 5events {6    worker_connections 1024;7}8 9http {10    include /etc/nginx/mime.types;11    default_type application/octet-stream;12    access_log /var/log/nginx/access.log combined;13    sendfile on;14    keepalive_timeout 65;15 16    # Add these settings for handling large file uploads17    client_max_body_size 10M;18    proxy_read_timeout 300;19    proxy_connect_timeout 300;20    proxy_send_timeout 300;21 22    server {23        listen 7860;24        root /app/static;25        index index.html;26 27        location / {28            try_files $uri $uri/ /index.html;29            add_header Cache-Control "no-cache";30        }31 32        location /api {33            proxy_pass http://localhost:8000;34            proxy_http_version 1.1;35            proxy_set_header Upgrade $http_upgrade;36            proxy_set_header Connection 'upgrade';37            proxy_set_header Host $host;38            proxy_set_header X-Real-IP $remote_addr;39            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;40            proxy_set_header X-Forwarded-Proto $scheme;41            proxy_cache_bypass $http_upgrade;42 43            # Add these for better file upload handling44            proxy_request_buffering off;45            proxy_buffering off;46        }47    }48}