-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdefault.conf
117 lines (90 loc) · 2.56 KB
/
default.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# default server
server {
listen 80 default_server;
listen 443 ssl default_server;
server_name _;
ssl_certificate /certs/default.crt;
ssl_certificate_key /certs/default.crt;
location / {
return 404;
}
location /health {
add_header Content-Type text/html;
return 200 "healthy";
}
}
# status for stats such as datadog
server {
listen 81;
server_name localhost;
access_log off;
#allow 127.0.0.1;
#deny all;
location /nginx_status {
stub_status on;
}
}
# test.com
upstream test_com {
server 192.168.34.12:80;
server 192.168.34.12:80;
}
server {
listen 80;
server_name test.com;
location / {
proxy_pass http://test_com;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
server {
listen 443 ssl;
server_name test.com;
ssl_certificate /certs/test.com.crt;
ssl_certificate_key /certs/test.com.crt;
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 10m;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS;
add_header Strict-Transport-Security "max-age=31536000";
location / {
proxy_pass http://test_com;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
# test2.com
upstream test_2_com {
server 192.168.34.12:80;
server 192.168.34.12:80;
}
server {
listen 80;
server_name test2.com;
location / {
proxy_pass http://test_2_com;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
server {
listen 443 ssl;
server_name test2.com;
ssl_certificate /certs/test2.com.crt;
ssl_certificate_key /certs/test2.com.crt;
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 10m;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS;
add_header Strict-Transport-Security "max-age=31536000";
location / {
proxy_pass http://test_2_com;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
}