Update 'NGINX-Installer.sh'

This commit is contained in:
bprieshof
2019-01-10 12:27:00 +01:00
parent 12150ed4fc
commit 14736dc595

View File

@@ -37,12 +37,18 @@ upstream netdata {
keepalive 64; keepalive 64;
} }
server {
listen 80;
server_name www.$domain;
return 301 http://$domain/\$request_uri\;
}
server { server {
listen 80; listen 80;
listen [::]:80; listen [::]:80;
root /var/www/$domain/html; root /var/www/$domain/html;
index index.php index.html index.htm index.nginx-debian.html; index index.php index.html index.htm index.nginx-debian.html;
server_name $domain www.$domain; server_name $domain;
#return 301 \$scheme:/\$domain\$request_uri; Redirect to non-www #return 301 \$scheme:/\$domain\$request_uri; Redirect to non-www
#return 301 https://domein.nl$request_uri; Redirect to other domain #return 301 https://domein.nl$request_uri; Redirect to other domain
@@ -52,7 +58,7 @@ server {
gzip on; gzip on;
gzip_proxied any; gzip_proxied any;
gzip_types text/plain text/css text/xml text/javascript application/javascript application/x-javascript image/svg+xml application/xml image/x-icon; gzip_types text/plain text/css text/xml text/javascript application/javascript application/x-javascript image/svg image/svg+xml application/xml image/x-icon;
gzip_min_length 1000; gzip_min_length 1000;
gzip_comp_level 2; gzip_comp_level 2;
gzip_disable "msie6"; gzip_disable "msie6";
@@ -67,9 +73,10 @@ server {
location = /favicon.ico { log_not_found off; access_log off; } location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; allow all; } location = /robots.txt { log_not_found off; access_log off; allow all; }
location ~* \.(css|gif|ico|jpeg|jpg|js|png|svg|eot|otf|woff|woff2|ttf|ogg)\$ { location ~* \.(css|gif|ico|jpeg|jpg|js|png|svg|webp|eot|otf|woff|woff2|ttf|ogg)\$ {
expires max; expires max;
log_not_found off; log_not_found off;
add_header Cache-Control "public, no-transform";
} }
location ~ \.php\$ { location ~ \.php\$ {