'NGINX-Installer.sh' updaten
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#-------------------#
|
||||
|
||||
apt install nginx mysql-server-5.7 -y
|
||||
ufw allow 'Nginx HTTP'
|
||||
mysql_secure_installation
|
||||
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"';"
|
||||
@@ -228,10 +229,10 @@ cat <<EOF > /etc/nginx/sites-available/default
|
||||
gzip_types *;
|
||||
}
|
||||
|
||||
root /var/www/html;
|
||||
root /var/www/$domain/html;
|
||||
index index.php index.html index.htm index.nginx-debian.html;
|
||||
|
||||
server_name _;
|
||||
server_name $domain www.$domain;
|
||||
|
||||
location / {
|
||||
try_files \$uri \$uri/ =404;
|
||||
@@ -323,7 +324,6 @@ fi
|
||||
|
||||
add-apt-repository ppa:certbot/certbot
|
||||
apt install python-certbot-nginx -y
|
||||
ufw allow 443/tcp
|
||||
#certbot --nginx -d $domain -d www.$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"
|
||||
|
||||
Reference in New Issue
Block a user