OLD | NEW |
1 server { | 1 server { |
2 server_name <%= @domain %>; | 2 server_name <%= @domain %>; |
| 3 |
3 <% if is_default %> | 4 <% if is_default %> |
4 listen 80 default_server; | 5 listen 80 default_server; |
5 listen [::]:80 default_server; | 6 listen [::]:80 default_server; |
6 <% else %> | 7 <% else %> |
7 listen 80; | 8 listen 80; |
8 listen [::]:80; | 9 listen [::]:80; |
9 <% end %> | 10 <% end %> |
10 | 11 |
| 12 location / { |
| 13 rewrite (.*) https://$host$1 permanent; |
| 14 } |
| 15 } |
| 16 |
| 17 server { |
| 18 server_name <%= @domain %>; |
| 19 |
| 20 <% if is_default %> |
| 21 listen 443 ssl default_server; |
| 22 listen [::]:443 ssl default_server; |
| 23 <% else %> |
| 24 listen 443 ssl; |
| 25 listen [::]:443 ssl; |
| 26 <% end %> |
| 27 |
| 28 ssl_certificate adblockplus.org_sslcert.pem; |
| 29 ssl_certificate_key adblockplus.org_sslcert.key; |
| 30 |
| 31 add_header Strict-Transport-Security max-age=31536000; |
| 32 |
11 location / | 33 location / |
12 { | 34 { |
13 set $path_info $request_uri; | 35 set $path_info $request_uri; |
14 if ($path_info ~ "(.*?)\?") | 36 if ($path_info ~ "(.*?)\?") |
15 { | 37 { |
16 set $path_info $1; | 38 set $path_info $1; |
17 } | 39 } |
18 | 40 |
19 fastcgi_pass unix:/tmp/trac-fastcgi.sock; | 41 fastcgi_pass unix:/tmp/trac-fastcgi.sock; |
20 include /etc/nginx/fastcgi_params; | 42 include /etc/nginx/fastcgi_params; |
21 fastcgi_param SCRIPT_NAME ""; | 43 fastcgi_param SCRIPT_NAME ""; |
22 fastcgi_param PATH_INFO $path_info; | 44 fastcgi_param PATH_INFO $path_info; |
23 } | 45 } |
24 | 46 |
25 location /chrome/ | 47 location /chrome/ |
26 { | 48 { |
27 alias /home/trac/htdocs/htdocs/; | 49 alias /home/trac/htdocs/htdocs/; |
28 } | 50 } |
29 } | 51 } |
OLD | NEW |