Index: modules/discourse/files/intraforum.adblockplus.org |
=================================================================== |
--- a/modules/discourse/files/intraforum.adblockplus.org |
+++ b/modules/discourse/files/intraforum.adblockplus.org |
@@ -1,8 +1,12 @@ |
+upstream discourse { |
+ server unix:///tmp/discourse-thin.sock; |
+} |
+ |
server { |
listen [::]:80; |
server_name intraforum.adblockplus.org; |
location / { |
rewrite (.*) https://intraforum.adblockplus.org$1 permanent; |
} |
} |
server { |
@@ -35,15 +39,17 @@ server { |
} |
# If the file exists as a static file serve it directly without |
# running all the other rewite tests on it |
if (-f $request_filename) { |
break; |
} |
- include /etc/nginx/fastcgi_params; |
+ proxy_set_header X-Real-IP $remote_addr; |
Felix Dahlke
2013/02/27 13:38:06
How about just one space between P and $?
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
+ proxy_set_header Host $http_host; |
if (!-f $request_filename) { |
- fastcgi_pass unix:/tmp/discourse-fastcgi.sock; |
+ proxy_pass http://discourse; |
break; |
} |
} |
} |