-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnginx-example-com.conf
34 lines (28 loc) · 1.01 KB
/
nginx-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
server {
if ($host = fxsync.example.com) {
return 301 https://$host$request_uri;
}
listen 80;
listen [::]:80;
server_name fxsync.example.com;
access_log /var/log/nginx/fxsync.example.com-access.log;
error_log /var/log/nginx/fxsync.example.com-error.log;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name fxsync.example.com;
location / {
proxy_pass http://localhost:5000;
proxy_set_header Host $http_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_redirect off;
proxy_read_timeout 120;
proxy_connect_timeout 10;
gzip off;
}
ssl_certificate /etc/letsencrypt/live/fxsync.example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/fxsync.example.com/privkey.pem; # managed by Certbot
}