Running Static page on Nginx
August 13, 2019
The last chapter was focusing on installing Nginx, let’s now look at the steps to deploy static web page through port 8079.
Step 1 –> Create a directory to save code-
cd /var/tmp
sudo mkdir Samplecode
cd Samplecode
Step 2 –> Create “Index.html” – a static web page
sudo vi index.html
Step 3 –> Configure Nginx by executing the following commands – first to edit configuration and then restarting Nginx-
cd /etc/nginx/sites-available
sudo vi TEST
cd /etc/nginx/sites-enabled
sudo ln -s ../sites-available/TEST
sudo service nginx restart #
Step 4 -> Open browser and access the URL as shown below-
http://<<local system IP>>:8077
You will be able to view your first static homepage. Interesting and easy right ? Try it out !!
One Comment
Good Insight….