Now, open Nginx Default site configuration sudo nano /etc/nginx/sites-available/default If you are using some other version of PHP then replace the php7.4 with that version or manually navigate to the path to check the FPM socket file. In the file find the PHP-fpm listening socket path: listen = 127.0.0.1:9000Ĭhange that to listen= /var/run/php/ Open the php-fpm configuration file sudo nano /etc/php/7.4/fpm/pool.d/www.conf Start PHP-fpm to start with Nginx: sudo service php7.4-fpm start Configure PHP-fpm for Nginx on Windows 10 WSL Open your system browser and type or or Start PHP-fpm service Optional: Commands to stop and restart the Nginx web server services sudo service nginx restart sudo service nginx stop Access Nginx through the browser When Windows Firewall asks you to allow the webserver services to access through the public network, allow it.Ĭheck the status sudo service nginx status sudo apt install nginx Start Nginx servicesīy default, the Nginx web server service will not be activated and we have to do that manually using the command. Just use the APT package manager to download and install it on your system. Just like Apache, the Nginx is also available to install in the default repository of Ubuntu, therefore no need to add any third-party repo. Sudo apt-get install php7.4-cli php7.4-fpm php7.4-curl php7.4-gd php7.4-mysql php7.4-mbstring zip unzip Install Nginx web server on Ubuntu 20.04 Windows 10 Note: replace the 7.4 with the version number available for your system. Now according to your PHP version, use the below command. sudo apt update sudo apt upgrade Install PHP on WSLįirst let’s check which version of PHP is currently available on the Ubuntu 20.04 LTS to install, for that use the below command: sudo apt-cache show php This will make sure all the system available packages on this Linux are up to date and in their latest state. Run Update and Upgrade commandsĪfter the installation of the Ubuntu 20.04 and setting up the user name and password run the below-given system update and upgrade commands. Previously, the long term versions of the Ubuntu available as WSL app on Microsoft store were 18.04 and 16.04 but now the Ubuntu 20.04 LTS focal fossa is the latest one, thus the same can be downloaded from the MS- App store. For more information related to it, you can see our tutorial: how to install WSL on Windows. I am assuming that you already have enabled WSL 1 or WSl 2 on your Windows 10 system, If not then go to the search box and type “Turn Windows feature on or off” after that select Windows Subsystem for Linux to enable it. Finally, Install MySQL Server Steps to install LEMP server on Ubuntu 20.04 LTS WSL Enable WSL on your Windows 10
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |