-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
39 lines (32 loc) · 1.2 KB
/
Copy pathnginx.conf
File metadata and controls
39 lines (32 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# ==============================================================================
# DropNote Nginx Reverse Proxy Configuration
# Place in /etc/nginx/conf.d/dropnote.conf or /etc/nginx/sites-available/dropnote
# ==============================================================================
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
# Maximum upload body size (15MB to allow 10MB file + form payload)
client_max_body_size 15M;
# Static assets caching & serving
location /static/ {
alias /opt/dropnote/app/static/;
expires 7d;
add_header Cache-Control "public, no-transform";
}
# Proxy all other requests to Gunicorn WSGI server
location / {
proxy_pass http://127.0.0.1:5000;
proxy_http_version 1.1;
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;
# Timeouts
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
# Disable buffering for fast streaming
proxy_buffering off;
}
}