PHP7 FPM configuration with Apache 2.4

After struggling a bit to find a working configuration for my PHP server setup based on PHP 7 FPM and Apache 2.4, here’s my working config.

Activate Apache actions mod: sudo a2enmod actions

Edit /etc/apache2/mods-available/fastcgi.conf

Basically, that’s telling apache to use PHP executable when someone is requesting a .php file.

Be sure php7.0-fpm service is running sudo service php7.0-fpm status. If not, start it sudo service php7.0-fpm start.

Here’s an example of a virtual host config file

 

Published by

Louwii

Web developer, geek, car enthusiast, photographer, DIYer, video gamer... I like many things, maybe too many?

Leave a Reply

Your email address will not be published. Required fields are marked *