File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ http {
128128
129129 # Proxy cache
130130 proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=1024m ;
131- proxy_cache_key "$host$request_uri $cookie_user " ;
131+ proxy_cache_key "$scheme$request_method$ host$request_uri" ;
132132 proxy_temp_path /var/cache/nginx/temp;
133133 proxy_ignore_headers Expires Cache-Control;
134134 proxy_cache_use_stale error timeout invalid_header http_502;
Original file line number Diff line number Diff line change 4242if [ -d " /var/log/roundcube" ]; then
4343 chown www-data:www-data /var/log/roundcube
4444fi
45+
46+ # Fix bug in nginx.conf for proxy cache
47+ if [ -d " /etc/nginx/nginx.conf" ]; then
48+ echo " [ ! ] Fixed an issue with proxy cache and redirects"
49+ sed -i ' s/proxy_cache_key "$host$request_uri $cookie_user";/proxy_cache_key "$scheme$request_method$host$request_uri";/g' /etc/nginx/nginx.conf
50+ fi
You can’t perform that action at this time.
0 commit comments