Update 'Apache-Installer.sh'

This commit is contained in:
tbergervoet
2018-10-04 12:18:24 +02:00
parent 5a8d02d27d
commit e1db87302c

View File

@@ -87,10 +87,9 @@ debconf-set-selections <<< "phpmyadmin phpmyadmin/mysql/admin-pass password $pas
debconf-set-selections <<< "phpmyadmin phpmyadmin/mysql/app-pass password $passsword" debconf-set-selections <<< "phpmyadmin phpmyadmin/mysql/app-pass password $passsword"
debconf-set-selections <<< "phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2" debconf-set-selections <<< "phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2"
apt install -y phpmyadmin apt install -y phpmyadmin
ln -s /usr/share/phpmyadmin /var/www/"$domain"/html
# Redirect phpmyadmin -> database # Redirect phpmyadmin -> database
mv /var/www/"$domain"/html/phpmyadmin /var/www/"$domain"/html/database ln -s /usr/share/phpmyadmin /var/www/"$domain"/html/database
a2disconf phpmyadmin.conf a2disconf phpmyadmin
##-------------## ##-------------##
# Postfix # # Postfix #
@@ -118,7 +117,7 @@ if [ $netdata = 1 ]
apt install -y netdata apt install -y netdata
sed -i 's/SEND_EMAIL="YES"/SEND_EMAIL="NO"/g' /etc/netdata/health_alarm_notify.conf sed -i 's/SEND_EMAIL="YES"/SEND_EMAIL="NO"/g' /etc/netdata/health_alarm_notify.conf
ufw allow 19999/tcp ufw allow 19999/tcp
sed -i 's/#netdata here/RewriteEngine On\n ProxyRequests Off\n ProxyReserveHost On\n <Proxy *>\n Require all granted\n <\/Proxy>\n ProxyPass "\/netdata\/" "http:\/\/localhost:19999\/" connectiontimeout=5 timeout=30 keepalive=on\n ProxyPassReverse "\/netdata\/" "http:\/\/localhost:19999\/"\n #RewriteRule ^\/netdata$ http:\/\/%{HTTP_HOST}\/netdata\/ [L,R=301] #HTTP\n RewriteRule ^\/netdata$ https:\/\/%{HTTP_HOST}\/netdata\/ [L,R=301] #HTTPS/g' /etc/apache2/sites-available/"$domain.conf" sed -i 's+#netdata here+RewriteEngine On\n ProxyRequests Off\n ProxyPreserveHost On\n <Proxy *>\n Require all granted\n </Proxy>\n ProxyPass "/netdata/" "http://localhost:19999/" connectiontimeout=5 timeout=30 keepalive=on\n ProxyPassReverse "/netdata/" "http://localhost:19999/"\n #RewriteRule ^/netdata$ http://%{HTTP_HOST}/netdata/ [L,R=301] #HTTP\n RewriteRule ^/netdata$ https://%{HTTP_HOST}/netdata/ [L,R=301] #HTTPS+g' /etc/apache2/sites-available/"$domain.conf"
# systemctl stop netdata # systemctl stop netdata
# systemctl disable netdata # systemctl disable netdata
fi fi
@@ -145,9 +144,7 @@ if [ $redis = 1 ]
sed -i 's/# bind 127.0.0.1 ::1/bind 127.0.0.1 ::1/g' /etc/redis/redis.conf sed -i 's/# bind 127.0.0.1 ::1/bind 127.0.0.1 ::1/g' /etc/redis/redis.conf
sed -i 's/# requirepass foobared/requirepass '$password'/g' /etc/redis/redis.conf sed -i 's/# requirepass foobared/requirepass '$password'/g' /etc/redis/redis.conf
# systemctl stop redis # systemctl stop redis
# systemctl stop redis.service
# systemctl disable redis # systemctl disable redis
# systemctl disable redis.service
fi fi
##-------------## ##-------------##
@@ -155,7 +152,7 @@ fi
##-------------## ##-------------##
apt install -y python-certbot-apache apt install -y python-certbot-apache
#certbot --apache -n -d "$domain" -d "www.$domain" -m "$email" --hsts --redirect --no-eff-email --agree-tos certbot --apache -n -d "$domain" -d "www.$domain" -m "$email" --hsts --redirect --no-eff-email --agree-tos
##---------------## ##---------------##
# Wordpress # # Wordpress #