Update 'NGINX-Installer.sh'
This commit is contained in:
@@ -44,6 +44,7 @@ else
|
||||
apt install -y nginx
|
||||
wget https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Web/raw/branch/master/config/nginx/nginx-default.conf -O /etc/nginx/nginx.conf
|
||||
fi
|
||||
mkdir -p /etc/nginx
|
||||
|
||||
apt install -y mysql-server
|
||||
# mysql_secure_installation automated
|
||||
@@ -55,6 +56,9 @@ mysql -u root -p"$password" -e "SELECT user,authentication_string,plugin,host FR
|
||||
mysql -u root -p"$password" -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '"$password"';"
|
||||
mysql -u root -p"$password" -e "FLUSH PRIVILEGES;"
|
||||
mysql -u root -p"$password" -e "SELECT user,authentication_string,plugin,host FROM mysql.user;"
|
||||
|
||||
wget https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Web/raw/branch/master/config/nginx/wprocket-nginx.conf -O /etc/nginx/wprocket-nginx.conf
|
||||
|
||||
cat <<EOF > /etc/nginx/sites-available/"$domain"
|
||||
#fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=MYAPP:100m max_size=10g inactive=1440m;
|
||||
|
||||
@@ -92,8 +96,8 @@ server {
|
||||
|
||||
location / {
|
||||
#try_files \$uri \$uri/ =404;
|
||||
#try_files \$uri \$uri/ /index.php\$is_args\$args;
|
||||
try_files \$uri \$uri/ \$uri.html \$uri.php\$is_args\$query_string;
|
||||
try_files \$uri \$uri/ /index.php\$is_args\$args;
|
||||
#try_files \$uri \$uri/ \$uri.html \$uri.php\$is_args\$query_string;
|
||||
}
|
||||
|
||||
location = /favicon.ico { log_not_found off; access_log off; }
|
||||
@@ -152,6 +156,21 @@ server {
|
||||
if (\$http_cookie = "PHPSESSID") {
|
||||
set \$no_cache 1;
|
||||
}
|
||||
# Increase bodysize for WP Rocket
|
||||
client_max_body_size 256M;
|
||||
## Rocket-Nginx configuration
|
||||
#include wprocket-nginx.conf;
|
||||
#Yoast SEO Sitemaps
|
||||
location ~ ([^/]*)sitemap(.*).x(m|s)l$ {
|
||||
## this rewrites sitemap.xml to /sitemap_index.xml
|
||||
rewrite ^/sitemap.xml$ /sitemap_index.xml permanent;
|
||||
## this makes the XML sitemaps work
|
||||
rewrite ^/([a-z]+)?-?sitemap.xsl$ /index.php?xsl=$1 last;
|
||||
rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
|
||||
rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
EOF
|
||||
|
||||
@@ -175,6 +194,8 @@ sed -i 's/upload_max_filesize = 2/upload_max_filesize = 128/g' /etc/php/7.2/fpm/
|
||||
sed -i 's/post_max_size = 8/post_max_size = 64/g' /etc/php/7.2/fpm/php.ini
|
||||
wget https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Web/raw/branch/master/config/nginx/www.confg -O /etc/php/7.2/fpm/pool.d/www.conf
|
||||
|
||||
|
||||
|
||||
##----------------##
|
||||
# PHPMyAdmin #
|
||||
##----------------##
|
||||
|
||||
Reference in New Issue
Block a user