'NGINX-Installer.sh' updaten

This commit is contained in:
ictmaatwerk
2018-09-10 10:14:08 +00:00
parent 24ea98f761
commit 2b6de3a178

View File

@@ -13,6 +13,7 @@
#-------------------# #-------------------#
apt install nginx mysql-server-5.7 -y apt install nginx mysql-server-5.7 -y
ufw allow 'Nginx HTTP'
mysql_secure_installation mysql_secure_installation
mysql -u root -p"$passwd" -e "SELECT user,authentication_string,plugin,host FROM mysql.user;" mysql -u root -p"$passwd" -e "SELECT user,authentication_string,plugin,host FROM mysql.user;"
mysql -u root -p"$passwd" -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '"$passwd"';" mysql -u root -p"$passwd" -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '"$passwd"';"
@@ -228,10 +229,10 @@ cat <<EOF > /etc/nginx/sites-available/default
gzip_types *; gzip_types *;
} }
root /var/www/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 _; server_name $domain www.$domain;
location / { location / {
try_files \$uri \$uri/ =404; try_files \$uri \$uri/ =404;
@@ -323,7 +324,6 @@ fi
add-apt-repository ppa:certbot/certbot add-apt-repository ppa:certbot/certbot
apt install python-certbot-nginx -y apt install python-certbot-nginx -y
ufw allow 443/tcp
#certbot --nginx -d $domain -d www.$domain #certbot --nginx -d $domain -d www.$domain
#sed -i 's/ssl ipv6only/ssl http2 ipv6only/g' /etc/nginx/sites-available/"$domain" #sed -i 's/ssl ipv6only/ssl http2 ipv6only/g' /etc/nginx/sites-available/"$domain"
#sed -i 's/listen 443 ssl/listen 443 ssl http2/g' /etc/nginx/sites-available/"$domain" #sed -i 's/listen 443 ssl/listen 443 ssl http2/g' /etc/nginx/sites-available/"$domain"