-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdefault.ssl.conf
More file actions
50 lines (38 loc) · 1.08 KB
/
Copy pathdefault.ssl.conf
File metadata and controls
50 lines (38 loc) · 1.08 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
40
41
42
43
44
45
46
47
48
49
50
# default.conf after generated ssl certificate
# Redirect all http (port 80) requests to https (port 443)
server {
listen 80;
listen [::]:80 ipv6only=on;
server_name _;
return 301 https://$host$request_uri;
}
# Listen to https requests
server {
# Adjust this url
server_name localhost [YOUR_URL];
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
# Adjust this path
ssl_certificate /etc/letsencrypt/live/[YOUR_URL]/fullchain.pem; # managed by Certbot
# Adjust this path
ssl_certificate_key /etc/letsencrypt/live/[YOUR_URL]/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
location / {
root /home/ubuntu/nginx-tutorial/website-template/;
index index.html;
}
location /api {
proxy_pass http://127.0.0.1:3000;
}
}
upstream basicService {
server 127.0.0.1:4000;
server 127.0.0.1:4001;
}
server {
listen 3333;
location / {
proxy_pass http://basicService;
}
}