-
Notifications
You must be signed in to change notification settings - Fork 87
Expand file tree
/
Copy pathnginx-default.txt
More file actions
58 lines (47 loc) · 1.66 KB
/
Copy pathnginx-default.txt
File metadata and controls
58 lines (47 loc) · 1.66 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
51
52
53
54
55
56
57
server {
server_name otherfreaks.com;
listen 80 default_server;
listen [::]:80 default_server;
return 301 https://$server_name$request_uri;
}
server {
server_name www.otherfreaks.com;
listen 443 ssl;
ssl_certificate /etc/ssl/certs/www_otherfreaks_com.pem;
ssl_certificate_key /etc/ssl/private/www_otherfreaks_com.key;
return 301 https://otherfreaks.com$request_uri;
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream nodeserver {
server 127.0.0.1:8080;
}
server {
listen 443 default_server ssl http2;
listen [::]:443 default_server ssl http2 ipv6only=on;
server_name otherfreaks.com;
proxy_set_header Origin "http://127.0.0.1:8080";
underscores_in_headers on;
ssl_certificate /etc/ssl/certs/www_otherfreaks_com.pem;
ssl_certificate_key /etc/ssl/private/www_otherfreaks_com.key;
location / {
proxy_pass http://127.0.0.1:8080;
}
location /chat {
proxy_pass http://nodeserver;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_intercept_errors on;
proxy_redirect off;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-NginX-Proxy true;
proxy_ssl_session_reuse off;
proxy_pass_header X-XSRF-TOKEN;
}
}