'RevProxyAdvanced.sh' updaten
This commit is contained in:
@@ -10,9 +10,9 @@
|
||||
# Set server IP variable for apache access
|
||||
server_ip=$(hostname -I|cut -f1 -d ' ')
|
||||
# Block direct apache acces
|
||||
ufw deny 8080/tcp
|
||||
#ufw deny 8080/tcp
|
||||
# Setup domain folder
|
||||
mkdir -p /var/www/"$domain"/public_htm
|
||||
mkdir -p /var/www/"$domain"/public_html
|
||||
|
||||
#-------------------#
|
||||
# APACHE + PHP-FPM #
|
||||
@@ -40,7 +40,7 @@ mysql -u root -p"$passwd" -e "SELECT user,authentication_string,plugin,host FROM
|
||||
mysql -u root -p"$passwd" -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '"$passwd"';"
|
||||
mysql -u root -p"$passwd" -e "FLUSH PRIVILEGES;"
|
||||
mysql -u root -p"$passwd" -e "SELECT user,authentication_string,plugin,host FROM mysql.user;"
|
||||
apt install libapache2-mod-php php-fpm php-mysql php-cgi php-common php-pear php-mbstring php-curl php-gd php-intl php-soap php-xml php-xmlrpc php-zip -y
|
||||
apt install -y libapache2-mod-php php-fpm php-mysql php-cgi php-common php-pear php-mbstring php-curl php-gd php-intl php-soap php-xml php-xmlrpc php-zip
|
||||
|
||||
#-------------------#
|
||||
# MOD_FASTCGI #
|
||||
@@ -116,7 +116,7 @@ nginx -t
|
||||
# REVERSE PROXY #
|
||||
#-------------------#
|
||||
|
||||
cat <<EOF > /etc/nginx/sites-available/apache
|
||||
cat <<EOF > /etc/nginx/sites-available/"$domain"
|
||||
server {
|
||||
listen 80;
|
||||
server_name $domain www.$domain;
|
||||
@@ -146,7 +146,7 @@ server {
|
||||
#ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||
}
|
||||
EOF
|
||||
ln -s /etc/nginx/sites-available/apache /etc/nginx/sites-enabled/apache
|
||||
ln -s /etc/nginx/sites-available/"$domain" /etc/nginx/sites-enabled/"$domain"
|
||||
nginx -t
|
||||
systemctl reload nginx
|
||||
|
||||
|
||||
Reference in New Issue
Block a user