Update 'Apache-Installer.sh'

This commit is contained in:
tbergervoet
2018-10-03 13:34:08 +02:00
parent 47863937e3
commit 446fc80fc4

View File

@@ -74,6 +74,8 @@ sed -i 's/;opcache.max_accelerated_files=10000/opcache.max_accelerated_files=500
sed -i 's/;opcache.max_wasted_percentage=5/opcache.max_wasted_percentage=5/g' /etc/php/7.2/apache2/php.ini sed -i 's/;opcache.max_wasted_percentage=5/opcache.max_wasted_percentage=5/g' /etc/php/7.2/apache2/php.ini
sed -i 's/;opcache.revalidate_freq=2/opcache.revalidate_freq=0/g' /etc/php/7.2/apache2/php.ini sed -i 's/;opcache.revalidate_freq=2/opcache.revalidate_freq=0/g' /etc/php/7.2/apache2/php.ini
sed -i 's/; max_input_vars = 1000/max_input_vars = 10000/g' /etc/php/7.2/apache2/php.ini sed -i 's/; max_input_vars = 1000/max_input_vars = 10000/g' /etc/php/7.2/apache2/php.ini
sed -i 's/upload_max_filesize = 2/upload_max_filesize = 128/g' /etc/php/7.2/apache2/php.ini
sed -i 's/post_max_size = 8/post_max_size = 64/g' /etc/php/7.2/apache2/php.ini
##----------------## ##----------------##
# PHPMyAdmin # # PHPMyAdmin #
@@ -116,6 +118,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"
# systemctl stop netdata # systemctl stop netdata
# systemctl disable netdata # systemctl disable netdata
fi fi
@@ -151,7 +154,6 @@ fi
# Certbot # # Certbot #
##-------------## ##-------------##
#add-apt-repository -y ppa:certbot/certbot
apt install -y python-certbot-apache apt install -y python-certbot-apache
#certbot --apache -d $domain -d www.$domain #certbot --apache -d $domain -d www.$domain
#sed -i 's/ssl ipv6only/ssl http2 ipv6only/g' /etc/apache2/sites-available/"$domain" #sed -i 's/ssl ipv6only/ssl http2 ipv6only/g' /etc/apache2/sites-available/"$domain"