-
Notifications
You must be signed in to change notification settings - Fork 5
/
denizpaz.ir.conf
50 lines (36 loc) · 1.12 KB
/
denizpaz.ir.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
server {
if ($host = denizpaz.ir) {
return 301 https://$host$request_uri;
} # managed by Certbot
# listen 80 default_server;
server_name denizpaz.ir;
return 301 https://denizpaz.ir$request_uri;
}
server {
# listen 80 default_server;
# listen [::]:80 default_server;
# server_name denizpaz.ir;
listen 443 ssl;
server_name denizpaz.ir;
ssl_certificate /etc/letsencrypt/live/denizpaz.ir/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/denizpaz.ir/privkey.pem; # managed by Certbot
ssl_protocols TLSv1.1 TLSv1.2;
# logging
access_log /var/log/nginx/denizpaz.ir.access.log;
error_log /var/log/nginx/denizpaz.ir.error.log warn;
# reverse proxy
location / {
proxy_pass http://127.0.0.1:3000;
# include myconfig/proxy.conf;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Forwarded-Ssl on;
}
# additional config
# include myconfig/general.conf;
}
server {
listen 80;
listen [::]:80;
server_name *.denizpaz.ir;
return 301 https://denizpaz.ir$request_uri;
}