-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.com.conf
34 lines (28 loc) · 898 Bytes
/
example.com.conf
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
# Nginx config template
# Don't forget to change it to meet your own env
upstream uvicorn {
server unix:/tmp/randomology/uvicorn.sock;
}
server {
listen 80;
listen 443 ssl;
listen [::]:443 ssl;
client_max_body_size 4G;
server_name example.com;
ssl_certificate /path/to/fullchain.pem;
ssl_certificate_key /path/to/privkey.pem;
location / {
root /var/www/example.com/public;
}
# your webhook
location /your-webhook-uri {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_redirect off;
proxy_buffering off;
proxy_pass http://uvicorn/your-webhook-uri;
}
}