-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexampleNginx.conf
More file actions
35 lines (29 loc) · 981 Bytes
/
exampleNginx.conf
File metadata and controls
35 lines (29 loc) · 981 Bytes
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
ssl_certificate /etc/letsencrypt/live/x.y/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/x.y/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
server {
listen 80;
listen [::]:80;
server_name *.x.y;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl http2;
server_name scrumble.x.y;
location / {
root /home/ubuntu/scrumble/www;
try_files $uri /index.html;
}
location /api {
proxy_pass http://localhost:8000;
proxy_set_header Host $server_name:$server_port;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}