Update 'Apache-Installer.sh'

This commit is contained in:
2018-09-07 12:18:01 +00:00
parent 0c7ac8178a
commit 587963c9e8

View File

@@ -159,7 +159,7 @@ if [ $wordpress = 1 ]
mysql -u root -p"$passwd" -e "GRANT ALL ON "$db_name".* TO '"$db_user"'@'localhost' IDENTIFIED BY '"$db_pass"';" mysql -u root -p"$passwd" -e "GRANT ALL ON "$db_name".* TO '"$db_user"'@'localhost' IDENTIFIED BY '"$db_pass"';"
mysql -u root -p"$passwd" -e "FLUSH PRIVILEGES;" mysql -u root -p"$passwd" -e "FLUSH PRIVILEGES;"
wget https://wordpress.org/latest.tar.gz -O /tmp/wp.tar.gz wget https://wordpress.org/latest.tar.gz -O /tmp/wp.tar.gz
tar xzvf /tmp/wp.tar.gz /tmp tar xzvf /tmp/wp.tar.gz -C /tmp
mv /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php mv /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php
cp -a /tmp/wordpress/. /var/www/"$domain"/public_html cp -a /tmp/wordpress/. /var/www/"$domain"/public_html
chown -R www-data:www-data /var/www/"$domain"/public_html chown -R www-data:www-data /var/www/"$domain"/public_html
@@ -206,6 +206,29 @@ if ( !defined('ABSPATH') )
require_once(ABSPATH . 'wp-settings.php'); require_once(ABSPATH . 'wp-settings.php');
EOF EOF
fi fi
#--------------------#
# WWW Folder Perms #
#--------------------#
chown -R www-data:www-data /var/www/"$domain"/public_html
#-------------------#
# OPCACHE GUI #
#-------------------#
wget https://raw.githubusercontent.com/amnuts/opcache-gui/master/index.php -O /var/www/"$domain"/public_html/opcache.php
#----------------#
# PHP.info #
#----------------#
cat > /var/www/"$domain"/public_html/info.php <<- "EOF"
<?php
phpinfo();
?>
EOF
#Edit voor https, voeg het volgende toe aan $domain-le-ssl.conf tussen DocumentRoot en ErrorLog #Edit voor https, voeg het volgende toe aan $domain-le-ssl.conf tussen DocumentRoot en ErrorLog
#<Directory "/var/www/videoguard.ictmaatwerk.com/public_html"> #<Directory "/var/www/videoguard.ictmaatwerk.com/public_html">
# Options FollowSymLinks # Options FollowSymLinks