Create Virtual Host in Nginx Server

To create a virtual host in Nginx server and access that by your browser you have to follow couple of steps. In this tutorial I will try to describe how you can create virtual host and how you can access your file by brower.

First STEP: Open your nginx configuration file by running this command.

sudo gedit /etc/nginx/sites-available/default

Second STEP: Then configure you host by following this

Third STEP: Open your hosts file.

sudo gedit /etc/hosts

And write ‘’  anywhere of your hosts file. Finally restart your nginx server and browser ‘’ in your browser. That’s it, hope it will work for you