OLD | NEW |
1 upstream discourse { | 1 upstream discourse { |
2 server unix:///tmp/discourse-thin.sock; | 2 server localhost:3000; |
3 } | 3 } |
4 | 4 |
5 server { | 5 server { |
6 listen 80; | 6 server_name <%= @domain %>; |
7 listen [::]:80; | 7 |
8 server_name intraforum.adblockplus.org; | 8 <% if is_default %> |
| 9 listen 80 default_server; |
| 10 listen [::]:80 default_server; |
| 11 <% else %> |
| 12 listen 80; |
| 13 listen [::]:80; |
| 14 <% end %> |
| 15 |
9 location / { | 16 location / { |
10 rewrite (.*) https://intraforum.adblockplus.org$1 permanent; | 17 rewrite (.*) https://$host$1 permanent; |
11 } | 18 } |
12 } | 19 } |
13 server { | 20 server { |
14 listen 443 ssl; | 21 server_name <%= @domain %>; |
15 listen [::]:443 ssl; | 22 |
16 server_name intraforum.adblockplus.org; | 23 <% if is_default %> |
| 24 listen 443 ssl default_server; |
| 25 listen [::]:443 ssl default_server; |
| 26 <% else %> |
| 27 listen 443 ssl; |
| 28 listen [::]:443 ssl; |
| 29 <% end %> |
| 30 |
17 ssl_certificate sites-available/adblockplus.org_sslcert.pem; | 31 ssl_certificate sites-available/adblockplus.org_sslcert.pem; |
18 ssl_certificate_key sites-available/adblockplus.org_sslcert.key; | 32 ssl_certificate_key sites-available/adblockplus.org_sslcert.key; |
19 | 33 |
20 gzip on; | 34 gzip on; |
21 gzip_min_length 1000; | 35 gzip_min_length 1000; |
22 gzip_types application/json text/css application/x-javascript; | 36 gzip_types application/json text/css application/x-javascript; |
23 | 37 |
24 sendfile on; | 38 sendfile on; |
25 keepalive_timeout 65; | 39 keepalive_timeout 65; |
26 | 40 |
(...skipping 22 matching lines...) Expand all Loading... |
49 proxy_set_header X-Real-IP $remote_addr; | 63 proxy_set_header X-Real-IP $remote_addr; |
50 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | 64 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
51 proxy_set_header X-Forwarded-Proto $scheme; | 65 proxy_set_header X-Forwarded-Proto $scheme; |
52 proxy_set_header Host $http_host; | 66 proxy_set_header Host $http_host; |
53 if (!-f $request_filename) { | 67 if (!-f $request_filename) { |
54 proxy_pass http://discourse; | 68 proxy_pass http://discourse; |
55 break; | 69 break; |
56 } | 70 } |
57 } | 71 } |
58 } | 72 } |
OLD | NEW |