diff --git a/Apache_PHP-FPM_Installer.sh b/Apache_PHP-FPM_Installer.sh index fc6bb0e..2e35050 100644 --- a/Apache_PHP-FPM_Installer.sh +++ b/Apache_PHP-FPM_Installer.sh @@ -1 +1,44 @@ -#placeholder \ No newline at end of file +###============================================================ +## Ubuntu 18.04 Apache PHP-FPM Installer +###============================================================ +## Zet comments hieronder: +# +# +# +##============================================================= + +apt remove -y libapache2-mod-php +cat < /etc/apache2/sites-available/"$domain.conf" + + Protocols h2 http/1.1 + #netdata here + ServerAdmin $email + ServerName $domain + ServerAlias www.$domain + DocumentRoot /var/www/$domain/html + + Options FollowSymLinks + AllowOverride All + Order allow,deny + Allow from all + + ErrorLog \${APACHE_LOG_DIR}/error.log + CustomLog \${APACHE_LOG_DIR}/access.log combined + +EOF + +a2enmod actions +mv /etc/apache2/mods-enabled/fastcgi.conf /etc/apache2/mods-enabled/fastcgi.conf.default +cat < /etc/apache2/mods-enabled/fastcgi.conf + + AddHandler fastcgi-script .fcgi + FastCgiIpcDir /var/lib/apache2/fastcgi + AddType application/x-httpd-fastphp .php + Action application/x-httpd-fastphp /php-fcgi + Alias /php-fcgi /usr/lib/cgi-bin/php-fcgi + FastCgiExternalServer /usr/lib/cgi-bin/php-fcgi -socket /run/php/php7.2-fpm.sock -pass-header Authorization + + Require all granted + + +EOF \ No newline at end of file