среда, 23 октября 2019 г.

Apache2.4 with PHP7.2-FPM on Ubuntu 18.04

I have installed PHP7.2-FPM on Ubuntu 18.04.
For enabling it in Apache2.4, I run those commands.

a2enmod proxy_fcgi
a2enconf php7.2-fpm

PHP sock file is /dev/shm/php-user7.2.sock
So FilesMatch block have to be added to virtualhost.

<FilesMatch \.php$>
  SetHandler "proxy:unix:/dev/shm/php-user7.2.sock|fcgi://localhost"
</FilesMatch>

or replaced it in /etc/apache2/conf-available/php7.2-fpm.conf

<FilesMatch ".+\.ph(ar|p|tml)$">
  SetHandler "proxy:unix:/dev/shm/php-user72.sock|fcgi://localhost"
</FilesMatch>

Комментариев нет:

Отправить комментарий