-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
60 lines (44 loc) · 2.34 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
server {
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/crmhack.itatmisis.ru/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/crmhack.itatmisis.ru/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
root /var/www/html;
index index.html;
server_name crmhack.itatmisis.ru;
location / {
try_files $uri $uri/ =404;
}
}
server {
if ($host = crmhack.itatmisis.ru) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name crmhack.itatmisis.ru;
listen 80;
return 404;
}
server {
listen 9999 ssl;
server_name crmhack.itatmisis.ru;
add_header Access-Control-Allow-Headers Content-Type,XFILENAME,XFILECATEGORY,XFILESIZE;
add_header access-control-allow-headers authorization;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' true;
location /{
proxy_pass http://localhost:9998;
proxy_set_header Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header 'Access-Control-Allow-Origin' '*';
proxy_set_header 'Access-Control-Allow-Credentials' true;
proxy_redirect off;
}
ssl_certificate /etc/letsencrypt/live/crmhack.itatmisis.ru/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/crmhack.itatmisis.ru/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}