How to change default web location path in Nginx

If you want to change default web location path in your Nginx web server, then keep your close attention in this post as I am going to share how to change default web location patient h in Nginx.

How to change default web location path in Nginx

Follow the steps to change Nginx default web location path.

1. Open the nginx.conf file.

2. Open nginx.conf file and locate below piece of configuration in file.

3. Now replace the “html”: with your desired folder location, like “/usr/freewebmentor/html”

4. Now save the all configuration files and restart Nginx using the below command.

Hope this tutorial has solve your need like how to change nginx default folder, how to change nginx default page, how to edit nginx configuration file, how to change nginx default port, etc…

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.