reverse_proxy.conf.erb
2.8 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
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
upstream colab {
server <%= node['peers']['integration'] %>:80 fail_timeout=10s;
}
server {
listen *:80;
server_name <%= node['config']['external_hostname'] %> <%= node['config']['sisp_external_hostname'] %>;
return 301 https://$host$request_uri;
}
server {
listen *:443 ssl;
server_name <%= node['config']['external_hostname'] %>;
client_max_body_size 500m;
ssl on;
ssl_certificate /etc/nginx/<%= node['config']['external_hostname'] %>.crt;
ssl_certificate_key /etc/nginx/<%= node['config']['external_hostname'] %>.key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 5m;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/ssl-<%= node['config']['external_hostname'] %>.access.log;
error_log /var/log/nginx/ssl-<%= node['config']['external_hostname'] %>.error.log;
# TODO caching
location / {
proxy_pass http://colab;
proxy_read_timeout 90;
proxy_connect_timeout 90;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Remote-User '';
proxy_set_header REMOTE_USER '';
}
location /doc {
root /srv;
}
}
server {
listen *:443 ssl;
server_name <%= node['config']['sisp_external_hostname'] %>;
client_max_body_size 500m;
ssl on;
ssl_certificate /etc/nginx/<%= node['config']['sisp_external_hostname'] %>.crt;
ssl_certificate_key /etc/nginx/<%= node['config']['sisp_external_hostname'] %>.key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 5m;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/ssl-<%= node['config']['sisp_external_hostname'] %>.access.log;
error_log /var/log/nginx/ssl-<%= node['config']['sisp_external_hostname'] %>.error.log;
location = / {
rewrite ^ /social/search/sisp?sort=asc;
}
# TODO caching
location / {
proxy_pass http://colab;
proxy_read_timeout 90;
proxy_connect_timeout 90;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Remote-User '';
proxy_set_header REMOTE_USER '';
}
}