Open a web browser and point it to (where SERVER is the IP address of the hosting server). In that file, paste the following contents: Sudo systemctl restart nginx How to test the installation In other words, uncomment (remove the # character) the lines: # With php-fpm (or other unix sockets):įastcgi_pass unix:/var/run/php/ In that file, look for the section under: Sudo nano /etc/nginx/sites-available/default Next, we need to edit the default virtualhost configuration. The first is to edit the default NGINX configuration file. Now we need to make a few configuration changes, so NGINX knows about PHP-FPM. If you see that PHP-FPM isn’t running (it should be), start it with the command:įinally, enable PHP-FPM with the command:Īgain, where X is the version number of PHP. You can then check on the status of PHP-FPM with the command: Once PHP-FPM is installed, you need to then find out which version of PHP is installed. The above command will download and install all of the necessary dependencies. Sudo apt install php php-cli php-fpm php-json php-pdo php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath -y Log in to your Ubuntu Server instance and, from the terminal window, issue the command: The first thing we must do is install PHP-FPM, and a few extras. I’ll be demonstrating on my server of choice, Ubuntu 20.04, but this process can be modified to work on any platform that supports PHP and PHP-FPM. The only things you’ll need for this are a running instance of NGINX and a user with sudo privileges. SEE: Linux service control commands (TechRepublic Premium) What you’ll need It’s not quite as simple as it is with Apache, but it shouldn’t be much of a challenge for any IT pro. I want to walk you through the process of installing PHP-FPM and then enabling it in your NGINX sites. PHP-FPM is much faster than traditional CGI-based multi-user PHP environments and also allows for the hosting of multiple applications using different versions of PHP. For those that might not know, PHP-FPM is a FastCGI handler for PHP scripts and apps, which makes it possible for a website to handle higher loads. If you’ve decided to make the switch from Apache to NGINX, one of the questions you might find yourself asking is how to add support for the PHP Fast Process Manager (PHP-FPM). Kubernetes is the key to cloud, but cost containment is criticalĪzure Monitor’s Change Analysis helps you troubleshoot problems quickly 5G Open RAN gains momentum: Next steps and challenges
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |