blob: 998bc9d8e84919458ca16a2cb2e181fb4e172f14 (
plain)
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
51
|
server {
server_name www.taar-o.com taar-o.com;
root /var/www/taar-o.com;
index index.html;
location /.well-known/acme-challenge/ {
alias /var/www/taar-o.com/.well-known/acme-challenge/;
try_files $uri =404;
}
location / {
try_files $uri $uri/ =404;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/www.taar-o.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/www.taar-o.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
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains" always;
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
location /api/ {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
server {
if ($host = taar-o.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = www.taar-o.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name www.taar-o.com taar-o.com;
return 404; # managed by Certbot
}
|