From 99c74069df622025fb1aa2ed1aa2a8038209b55a Mon Sep 17 00:00:00 2001 From: tbergervoet Date: Wed, 17 Oct 2018 15:13:59 +0200 Subject: [PATCH] Update 'NGINX-Installer.sh' --- NGINX-Installer.sh | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/NGINX-Installer.sh b/NGINX-Installer.sh index 0768068..bac5089 100644 --- a/NGINX-Installer.sh +++ b/NGINX-Installer.sh @@ -3,7 +3,7 @@ ###============================================================ ## Zet comments hieronder: # -# Add ssl_dhparam +# # ##============================================================= @@ -30,7 +30,7 @@ mysql -u root -p"$password" -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH my mysql -u root -p"$password" -e "FLUSH PRIVILEGES;" mysql -u root -p"$password" -e "SELECT user,authentication_string,plugin,host FROM mysql.user;" cat < /etc/nginx/sites-available/"$domain" -fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=MYAPP:100m max_size=10g inactive=1440m; +#fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=MYAPP:100m max_size=10g inactive=1440m; upstream netdata { server 127.0.0.1:19999; @@ -46,6 +46,8 @@ server { #return 301 \$scheme:/\$domain\$request_uri; Redirect to non-www #return 301 https://domein.nl$request_uri; Redirect to other domain + #add_header X-Cache "\$upstream_cache_status"; + #netdata here gzip on; @@ -72,19 +74,19 @@ server { location ~ \.php\$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; - fastcgi_cache MYAPP; - fastcgi_cache_valid 200 302 301 1m; - fastcgi_cache_valid 404 1m; - fastcgi_cache_bypass \$no_cache; - fastcgi_no_cache \$no_cache; - fastcgi_cache_revalidate on; - fastcgi_cache_background_update on; - fastcgi_cache_lock on; - fastcgi_cache_use_stale updating; - fastcgi_buffer_size 128k; - fastcgi_buffers 256 16k; - fastcgi_busy_buffers_size 256k; - fastcgi_temp_file_write_size 256k; + #fastcgi_cache MYAPP; + #fastcgi_cache_valid 200 302 301 1m; + #fastcgi_cache_valid 404 1m; + #fastcgi_cache_bypass \$no_cache; + #fastcgi_no_cache \$no_cache; + #fastcgi_cache_revalidate on; + #fastcgi_cache_background_update on; + #fastcgi_cache_lock on; + #fastcgi_cache_use_stale updating; + #fastcgi_buffer_size 128k; + #fastcgi_buffers 256 16k; + #fastcgi_busy_buffers_size 256k; + #fastcgi_temp_file_write_size 256k; } location ~ /\.ht { @@ -131,8 +133,7 @@ events { http { - fastcgi_cache_key \$scheme\$request_method\$host\$request_uri; - add_header X-Cache "\$upstream_cache_status"; + #fastcgi_cache_key \$scheme\$request_method\$host\$request_uri; sendfile on; tcp_nopush on; @@ -255,9 +256,7 @@ if [ $redis = 1 ]; then sed -i 's/# bind 127.0.0.1 ::1/bind 127.0.0.1 ::1/g' /etc/redis/redis.conf sed -i 's/# requirepass foobared/requirepass '$password'/g' /etc/redis/redis.conf # systemctl stop redis - # systemctl stop redis.service # systemctl disable redis - # systemctl disable redis.service fi ##-------------##