forked from Smuzzy-waiii/bunsamosa-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx-conf
33 lines (25 loc) · 1.05 KB
/
nginx-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
#name of this conf file should be same as the domain name
#for eg for us, file name is "navinshrinivas.com"
#and it should be symlinked to /etc/nginx/sites-enabled
#and stored in /etc/nginx/sites-available
#only the server_name and location block of the
#first server block is required. Rest will be generated by cert-bot
server {
server_name hacknight.navinshrinivas.com;
location / {
proxy_pass http://127.0.0.1:3000;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/hacknight.navinshrinivas.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/hacknight.navinshrinivas.com/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
}
server {
if ($host = hacknight.navinshrinivas.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name hacknight.navinshrinivas.com;
listen 80;
return 404; # managed by Certbot
}