A platform for community discussion. Free, open, simple.
FIX: Have nginx always pass `/uploads/short-url` requests to app.
Guo Xiang Tanc920f9d137a8
diff --git a/config/nginx.sample.conf b/config/nginx.sample.confindex 6ea850cf1b0..5e67988416a 100644--- a/config/nginx.sample.conf+++ b/config/nginx.sample.conf@@ -91,11 +91,21 @@ server {# auth_basic on;# auth_basic_user_file /etc/nginx/htpasswd;+ location ~ ^/uploads/short-url/ {+ proxy_set_header Host $http_host;+ proxy_set_header X-Real-IP $remote_addr;+ proxy_set_header X-Request-Start "t=${msec}";+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;+ proxy_set_header X-Forwarded-Proto $thescheme;+ proxy_pass http://discourse;+ break;+ }+location ~* (assets|plugins|uploads)/.*\.(eot|ttf|woff|woff2|ico)$ {expires 1y;add_header Cache-Control public,immutable;add_header Access-Control-Allow-Origin *;- }+ }location = /srv/status {access_log off;