Update 'Apache_PHP-FPM_Installer.sh'
This commit is contained in:
@@ -7,38 +7,11 @@
|
|||||||
#
|
#
|
||||||
##=============================================================
|
##=============================================================
|
||||||
|
|
||||||
apt remove -y libapache2-mod-php
|
apachectl stop
|
||||||
cat <<EOF > /etc/apache2/sites-available/"$domain.conf"
|
apt install -y php-fpm
|
||||||
<VirtualHost *:80>
|
a2enmod proxy_fcgi setenvif
|
||||||
Protocols h2 http/1.1
|
a2enconf php7.2-fpm
|
||||||
#netdata here
|
a2dismod php7.2
|
||||||
ServerAdmin $email
|
a2dismod mpm_prefork
|
||||||
ServerName $domain
|
a2enmod mpm_worker
|
||||||
ServerAlias www.$domain
|
apachectl start
|
||||||
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