-
Notifications
You must be signed in to change notification settings - Fork 10
/
nginx.sites.conf
97 lines (72 loc) · 2.18 KB
/
nginx.sites.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
server {
listen 80 default_server;
listen 443 ssl default_server;
server_name ansible.http.tests _;
ssl_certificate /root/ca/ansible.http.tests-cert.pem;
ssl_certificate_key /root/ca/private/ansible.http.tests-key.pem;
ssl_client_certificate /root/ca/cacert.pem;
ssl_verify_client optional;
location =/cacert.pem {
alias /usr/share/nginx/html/cacert.pem;
}
location =/ca2cert.pem {
alias /usr/share/nginx/html/ca2cert.pem;
}
location =/client.key {
alias /usr/share/nginx/html/client.key;
}
location =/client.pem {
alias /usr/share/nginx/html/client.pem;
}
location =/gssapi {
auth_gss on;
auth_gss_keytab /etc/nginx.keytab;
auth_gss_allow_basic_fallback off;
alias /usr/share/nginx/html/gssapi;
}
location =/ssl_client_verify {
return 200 "ansible.http.tests:$ssl_client_verify";
}
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;
}
}
server {
listen 80;
listen 443 ssl;
server_name sni1.ansible.http.tests;
ssl_certificate /root/ca/sni1.ansible.http.tests-cert.pem;
ssl_certificate_key /root/ca/private/sni1.ansible.http.tests-key.pem;
location / {
return 200 "sni1.ansible.http.tests";
}
}
server {
listen 80;
listen 443 ssl;
server_name sni2.ansible.http.tests;
ssl_certificate /root/ca/sni2.ansible.http.tests-cert.pem;
ssl_certificate_key /root/ca/private/sni2.ansible.http.tests-key.pem;
location / {
return 200 "sni2.ansible.http.tests";
}
}
server {
listen 80;
listen 444 ssl;
server_name self-signed.ansible.http.tests;
ssl_certificate /root/ca2/self-signed.ansible.http.tests-cert.pem;
ssl_certificate_key /root/ca2/private/self-signed.ansible.http.tests-key.pem;
location / {
return 200 "self-signed.ansible.http.tests";
}
}
server {
listen 80;
server_name fail.ansible.http.tests;
rewrite /(.*) https://$host/$1 permanent;
}