| OLD | NEW |
| 1 upstream discourse { |
| 2 server unix:///tmp/discourse-thin.sock; |
| 3 } |
| 4 |
| 1 server { | 5 server { |
| 2 listen [::]:80; | 6 listen [::]:80; |
| 3 server_name intraforum.adblockplus.org; | 7 server_name intraforum.adblockplus.org; |
| 4 location / { | 8 location / { |
| 5 rewrite (.*) https://intraforum.adblockplus.org$1 permanent; | 9 rewrite (.*) https://intraforum.adblockplus.org$1 permanent; |
| 6 } | 10 } |
| 7 } | 11 } |
| 8 server { | 12 server { |
| 9 listen [::]:443 ssl; | 13 listen [::]:443 ssl; |
| 10 server_name intraforum.adblockplus.org; | 14 server_name intraforum.adblockplus.org; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 add_header ETag ""; | 37 add_header ETag ""; |
| 34 break; | 38 break; |
| 35 } | 39 } |
| 36 | 40 |
| 37 # If the file exists as a static file serve it directly without | 41 # If the file exists as a static file serve it directly without |
| 38 # running all the other rewite tests on it | 42 # running all the other rewite tests on it |
| 39 if (-f $request_filename) { | 43 if (-f $request_filename) { |
| 40 break; | 44 break; |
| 41 } | 45 } |
| 42 | 46 |
| 43 include /etc/nginx/fastcgi_params; | 47 proxy_set_header X-Real-IP $remote_addr; |
| 48 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 49 proxy_set_header Host $http_host; |
| 44 if (!-f $request_filename) { | 50 if (!-f $request_filename) { |
| 45 fastcgi_pass unix:/tmp/discourse-fastcgi.sock; | 51 proxy_pass http://discourse; |
| 46 break; | 52 break; |
| 47 } | 53 } |
| 48 } | 54 } |
| 49 } | 55 } |
| OLD | NEW |