Categories
Apache Web Server

Create Virtual Host in Apache Server

  • To create a virtual host in Apache 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.

Virtual Host in Apache Server
Virtual Host in Apache Server

Virtual Host in Apache Server

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

sudo gedit /etc/apache2/sites-available/000-defaultonf

Second STEP: Then configure you host by following this

Third STEP: Open your hosts file.

sudo gedit /etc/hosts

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

By Sohel Rana

PHP Programmer, Software Engineer & Technology lover

Leave a Reply

Your email address will not be published. Required fields are marked *