Update 'Apache_PHP-FPM_Installer.sh'
This commit is contained in:
@@ -1 +1,44 @@
|
||||
#placeholder
|
||||
###============================================================
|
||||
## Ubuntu 18.04 Apache PHP-FPM Installer
|
||||
###============================================================
|
||||
## Zet comments hieronder:
|
||||
#
|
||||
#
|
||||
#
|
||||
##=============================================================
|
||||
|
||||
apt remove -y libapache2-mod-php
|
||||
cat <<EOF > /etc/apache2/sites-available/"$domain.conf"
|
||||
<VirtualHost *:80>
|
||||
Protocols h2 http/1.1
|
||||
#netdata here
|
||||
ServerAdmin $email
|
||||
ServerName $domain
|
||||
ServerAlias www.$domain
|
||||
DocumentRoot /var/www/$domain/html
|
||||
<Directory "/var/www/$domain/html">
|
||||
Options FollowSymLinks
|
||||
AllowOverride All
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
ErrorLog \${APACHE_LOG_DIR}/error.log
|
||||
CustomLog \${APACHE_LOG_DIR}/access.log combined
|
||||
</VirtualHost>
|
||||
EOF
|
||||
|
||||
a2enmod actions
|
||||
mv /etc/apache2/mods-enabled/fastcgi.conf /etc/apache2/mods-enabled/fastcgi.conf.default
|
||||
cat <<EOF > /etc/apache2/mods-enabled/fastcgi.conf
|
||||
<IfModule mod_fastcgi.c>
|
||||
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
|
||||
<Directory /usr/lib/cgi-bin>
|
||||
Require all granted
|
||||
</Directory>
|
||||
</IfModule>
|
||||
EOF
|
||||
Reference in New Issue
Block a user