File discourse.fix-nginx-config.patch of Package discourse
Index: discourse/config/nginx.sample.conf
===================================================================
--- discourse.orig/config/nginx.sample.conf
+++ discourse/config/nginx.sample.conf
@@ -7,13 +7,13 @@ types {
}
upstream discourse {
- server 127.0.0.1:3000;
+ server unix:/srv/www/vhosts/discourse/tmp/sockets/puma.sock;
}
# inactive means we keep stuff around for 1440m minutes regardless of last access (1 week)
# levels means it is a 2 deep hierarchy cause we can have lots of files
# max_size limits the size of the cache
-proxy_cache_path /var/nginx/cache inactive=1440m levels=1:2 keys_zone=one:10m max_size=600m;
+proxy_cache_path /var/lib/nginx/cache/ inactive=1440m levels=1:2 keys_zone=one:10m max_size=600m;
# Increased from the default value to acommodate large cookies during oAuth2 flows
# like in https://meta.discourse.org/t/x/74060 and large CSP and Link (preload) headers
@@ -42,7 +42,7 @@ geo $bypass_cache {
include conf.d/outlets/before-server/*.conf;
server {
- access_log /var/log/nginx/access.log log_discourse;
+ access_log /var/log/nginx/discourse.access.log log_discourse;
listen 80;
@@ -66,7 +66,7 @@ server {
client_max_body_size 10m;
# path to discourse's public directory
- set $public /var/www/discourse/public;
+ set $public /srv/www/vhosts/discourse/public; # $public
# without weak etags we get zero benefit from etags on dynamically compressed content
# further more etags are based on the file in nginx not sha of data