diff --git a/Apache-Installer.sh b/Apache-Installer.sh index c36462e..a7e4a78 100644 --- a/Apache-Installer.sh +++ b/Apache-Installer.sh @@ -20,7 +20,7 @@ chmod -R 755 /var/www # Apache + MySQL # ##--------------------## -apt install -y apache2 mysql-server-5.7 libapache2-mod-proxy-html +apt install -y apache2 mysql-server-5.7 # mysql_secure_installation automated mysqladmin -u root password "$password" mysql -u root -p"$password" -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1')" @@ -115,7 +115,7 @@ if [ $netdata = 1 ]; then apt install -y netdata sed -i 's/SEND_EMAIL="YES"/SEND_EMAIL="NO"/g' /etc/netdata/health_alarm_notify.conf ufw allow 19999/tcp - sed -i 's+#netdata here+RewriteEngine On\n ProxyRequests Off\n ProxyPreserveHost On\n \n Require all granted\n \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 \n Require all granted\n \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 disable netdata fi @@ -162,7 +162,7 @@ if [ $wordpress = 1 ]; then mysql -u root -p"$password" -e "GRANT ALL ON "$db_name".* TO '"$db_user"'@'localhost' IDENTIFIED BY '"$db_pass"';" mysql -u root -p"$password" -e "FLUSH PRIVILEGES;" wget https://wordpress.org/latest.tar.gz -O /tmp/wp.tar.gz - tar xzvf /tmp/wp.tar.gz -C /tmp + tar xzf /tmp/wp.tar.gz -C /tmp mv /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php cp -a /tmp/wordpress/. /var/www/"$domain"/html WPSalts=$(wget https://api.wordpress.org/secret-key/1.1/salt/ -q -O -) diff --git a/README.md b/README.md index 2990576..b853606 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ https://gist.github.com/TimVNL/b22cbdeea4b6f438ae5e90f75afed838 Brotli voor NGINX: -https://www.enovate.co.uk/blog/2017/02/28/how-to-brotli-compression-with-nginx +https://www.howtoforge.com/tutorial/how-to-install-nginx-with-brotli-compression-on-ubuntu-1804/ Werkend NGINX server block voor de reverse proxy: