How to setup virtual web hosting and host multiple sites on single server? [ In two minute ]

Photo by Taylor Vick on Unsplash

Setting up sites in directory

First of all you need to make sure your website/web app resides somewhere in web root directory, suppose you’ve directory called sites

Pointing your domain to server

You can simply put IP address of server in your DNS setting which will start pointing your domain to server where you are about to host your websites/web app.

Create virtual host configuration

Enable site configuration

Now you need to enable this configuration to enable site on your machine.

What’s next?

If you face any problem in saving or execution of apache, check everything once again, for any typo or similar stuff.

--

--

Self taught programmer, traveller, blogger, explorer.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store