How Can We Help?
< All Topics
Print

Optimizing Your VPS: Enabling nginx-Varnish-Apache and PHP-FPM with PHP 7 Extensions

PHP-FPM is a faster alternative to FastCGI, designed for high-traffic sites. It is the preferred method for working with PHP pages using NGINX and outperforms traditional CGI-based methods such as SUPHP or mod_php for running PHP scripts. It is suitable for VPS with CentOS 7 64-bit and the CentOS Panel template.

a) Install PHP versions

1. Log in to your VPS and click on the PHP-FPM Selector (New) button on the side menu.

PHP-FPM

2. Then, select the desired PHP version and, if necessary, switch between multiple versions like 5.6 and 7.0.

3. After that, click “Start Compiler” button to install all PHP versions, which should take over 30 minutes, and a notification will appear in CentOSPanel once installation is completed.

4. Finally, refresh the PHP-FPM selector page and click the Start button on any PHP version.

b) Rebuild the server

1. Next, open Web Server Settings, select Web Server, and then choose nginx, Varnish, and Apache and rebuild the server to apply the changes.

c) Activate the required options

1. After that, create a new hosting account by going to “User Accounts“, select “New Account” to activate nginx-Varnish-Apache, PHP-FPM, and PHP 7 for a domain.

2. Then, open Web Server Settings, select Web Server Domain Configuration and then choose the username. Next, click on create the configuration, and then choose the nginx-Varnish-Apache & PHP-FPM options to activate nginx-Varnish-Apache, PHP-FPM, and PHP 7 for the domain name.

Table of Contents