How to install PHP-FPM with Apache on Ubuntu 20.04

How to install PHP-FPM with Apache on Ubuntu 20.04

PHP FPM (FastCGI Process Manager) is an alternative to PHP-FastCGI implementation with some additional features, generally used for running heavy web applications.

1. Install Apache

Install Apache and FastCGI module.

2. Install PHP and PHP-FPM

Install PHP and PHP-FPM.

Check the status of the php-fpm service.

3. Configure Apache

Activate the required module.

Configure the virtual host to run PHP-FPM.

Add the below configuration between VirtualHost tag.

Restart Apache.

4. Testing

Create a PHP script that display PHP information.

Access http://localhost/info.php or http://serverIP/info.php. In the Server API the value is FPM/FastCGI.

PHP Information
PHP Information

Good luck 🙂

Default image
Musa Amin
I am a Linux System Administrator and also write many tutorials about Linux, Cloud, and Open Source. Hire me via email hai[at]musaamin.web.id.

Leave a Reply