Install Nginx
Last updated
Was this helpful?
Last updated
Was this helpful?
The first step in creating a LEMP stack on Ubuntu 20.04 is by updating the package lists and installing Nginx.
Type Y
and ENTER
if prompted.
Once installed, check to see if the Nginx service is running.
If Nginx is running correctly, you should see a green Active state below.
You may to type CTRL
+C
and hit ENTER
or Q
to exit the service status.
Now you can access through Command Prompt using your root details.
Add new rules.
For both the output look like this:
Enable ufw
firewall.
Press Y
when asked to proceed.
Now check the firewall status.
The Nginx component of your LEMP Stack on Ubuntu 20.04 should now be ready to serve web pages.
Go to your web browser and visit your domain or IP. If you donβt have a domain name yet access by your IP.
You can find this Nginx default welcome page in the document root directory /var/www/html
. To edit this file in nano
text editor:
To save and close nano, press CTRL
+ X
and then press Y
and ENTER
to save changes.
Your Nginx web server is ready to go. You can now add your own html files and images at /var/www/html
directory.
You've completed this section, now you can see your website at browser.