To do so, create a new Nginx virtual host configuration file with the following command: nano /etc/nginx/sites-available/exampleįastcgi_pass unix:/run/php/ Next, you will need to configure Nginx to process PHP files. Systemctl enable php7.4-fpm Configure Nginx to Process PHP Files Once all the packages are installed, start the PHP7.4-FPM service and enable it to start at system reboot: systemctl start php7.4-fpm
INSTALL PHPSTORM UBUNTU 20.04 INSTALL
You can install PHP7.4-FPM with other necessary extensions by running the following command: apt-get install php7.4-fpm php7.4-cli php7.4-mysql php7.4-curl php7.4-json -y FPM is an alternative PHP FastCGI implementation with some additional features useful for heavy-loaded sites. So you will need to install PHP-FPM for processing the PHP files. Nginx does not contain native PHP processing. You can modify it for better performance. PHP configurations related to Nginx is stored in /etc/php/7.4/fpm/php.ini file. With Zend OPcache v7.4.3, Copyright (c), by Zend Technologies Zend Engine v3.4.0, Copyright (c) Zend Technologies You should get the following output: PHP 7.4.3 (cli) (built: 15:47:56) ( NTS ) Once the PHP is installed, verify the installed version with the following command: php -version You can install it easily by just running the following command: apt-get install php7.4 -y You should get the following output: nginx version: nginx/1.18.0 (Ubuntu)īy default, Ubuntu 20.04 ships with PHP 7.4 in its upstream repositories. You can also verify the installed version of Nginx using the following command: nginx -v
You can install it with the following command: apt-get install nginx -yĪfter installing Nginx, start the Nginx service and enable it to start at system reboot with the following command: systemctl start nginx
INSTALL PHPSTORM UBUNTU 20.04 UPDATE
You can do this by running the following commands: apt-get update -yīy default, the latest version of Nginx is available in the Ubuntu 20.04 default repository.
Additionally, replace ‘root’ with the username of the admin account if necessary.īefore starting, you have to make sure that all Ubuntu OS packages installed on the server are up to date. You will need to replace ‘IP_Address‘ and ‘Port_number‘ with your server’s respective IP address and SSH port number. Log in to the Server & Update the Server OS Packagesįirst, log in to your Ubuntu 20.04 server via SSH as the root user: ssh -p Port_number