Browse Source

Merge pull request #1744 from hestiacp/nginx-cache

Nginx cache improvements & version bumps
Kristan Kenney 4 years ago
parent
commit
39509be29b

+ 2 - 0
install/deb/nginx/nginx.conf

@@ -45,6 +45,8 @@ http {
     fastcgi_send_timeout            180s;
     fastcgi_cache_lock              on;
     fastcgi_cache_lock_timeout      5s;
+    fastcgi_cache_background_update on;
+    fastcgi_cache_revalidate        on;
     
     # Proxy settings
     proxy_redirect                  off;

+ 4 - 2
install/upgrade/versions/1.4.0.sh

@@ -12,11 +12,13 @@ if [ -e "/etc/nginx/nginx.conf" ]; then
     if [ -z "$check" ]; then 
         echo "[ * ] Enabling nginx FastCGI cache support..."
         sed  -i 's/# Cache bypass/# FastCGI cache\n    fastcgi_cache_path \/var\/cache\/nginx\/micro levels=1:2 keys_zone=microcache:10m max_size=1024m inactive=30m;\n    fastcgi_cache_key \"$scheme$request_method$host$request_uri\";\n    fastcgi_cache_methods GET HEAD;\n    fastcgi_cache_use_stale updating error timeout invalid_header http_500 http_503;\n    fastcgi_ignore_headers Cache-Control Expires Set-Cookie;\n    add_header X-FastCGI-Cache \$upstream_cache_status;\n\n    # Cache bypass/g' /etc/nginx/nginx.conf
+sed  -i 's/    fastcgi_cache_lock_timeout      5s;/    fastcgi_cache_lock_timeout      5s;\n    fastcgi_cache_background_update on;\n    fastcgi_cache_revalidate        on;/g' /root/nginx.conf
+
     fi
 fi
 
 if [ -e "/etc/nginx/nginx.conf" ]; then
-    echo "[ * ] Update Nginx.conf with changes to Cloudflare IP addresses"
+    echo "[ * ] Updating nginx configuration with changes to Cloudflare IP addresses"
     sed  -i 's/    set_real_ip_from 104.16.0.0\/12;/    set_real_ip_from 104.16.0.0\/13;\n    set_real_ip_from 104.24.0.0\/14;/g' /etc/nginx/nginx.conf
 fi
 
@@ -165,4 +167,4 @@ if [ -d "$HESTIA/web/images/webapps/" ]; then
     rm -rf $HESTIA/web/src/app/WebApp/Installers/PrestashopSetup.php
     rm -rf $HESTIA/web/src/app/WebApp/Installers/SymfonySetup.php
     rm -rf $HESTIA/web/src/app/WebApp/Installers/WordpressSetup.php
-fi
+fi

+ 1 - 1
src/deb/nginx/control

@@ -1,7 +1,7 @@
 Source: hestia-nginx
 Package: hestia-nginx
 Priority: optional
-Version: 1.19.8
+Version: 1.19.10
 Section: admin
 Maintainer: HestiaCP <info@hestiacp.com>
 Homepage: https://www.hestiacp.com

+ 1 - 1
src/hst_autocompile.sh

@@ -211,7 +211,7 @@ fi
 echo "Build version $BUILD_VER, with Nginx version $NGINX_V and PHP version $PHP_V"
 
 HESTIA_V="${BUILD_VER}_${BUILD_ARCH}"
-OPENSSL_V='1.1.1j'
+OPENSSL_V='1.1.1k'
 PCRE_V='8.44'
 ZLIB_V='1.2.11'