How i can make separate domain for each site

November 26, 2015 703 views
Linux Commands CMS

i am beginner. i am installed virtual box 5 and set up centOS 6.7 minimal. I am install all LAMP and everthing works fine.I made database and user in phpMyAdmin for Joomla and WP.
I must install two web sites(Joomla and Drupal) on separate domain in browser and separate folder using C:\Windows\System32\drivers\etc for direction ip address.
When i install Joomla i can enter on site with my ip adress

1 comment
  • Instead of lamp use Vesta CP , you can install it with single command.Easy to use.Use centos 6.7 currently i am using it it helps me a lot.If you need any help .Give a reply here....

3 Answers


Are you trying to set this up on a Droplet through DigitalOcean or on your local Windows PC? If you are looking to setup a LAMP stack on a Droplet, you really don't need VirtualBox as Apache will be able to handle as many domains as you need while providing the ability to use your domains.

I would recommend looking over the following tutorial. It's for Fedora, though you could just as easily replace Fedora with CentOS as things are ultimately similar and the commands should not differ.

A LAMP stack is a group of open source software used to get web servers up and running. The acronym stands for Linux, Apache, MySQL, and PHP. Since the server is already running Fedora, the Linux part is taken care of. Here is how to install the rest on Fedora 22.

I must use centOS and virtual box.

I'm using NginX, but the principles are the same in that "beginner" needs to set up virtual hosts for the web server. That Fedora link isn't sufficient information. I do agree that setting up virutal box is a weird approach, assuming "beginner" is trying to take one droplet and create two virtual servers. Apache and NginX can keep the websites isolated, though they will share the same IP address.

I'm using FreeBSD, so I can't be of much more help, (Well providing people think I helped at all. ;-)) Here is a google hit regading virutal hosts, but obviously untested by me.

Doing a quick scan of the article, I don't a mention of DNS, but obviously you have to set up DNS for each domain, even if the actual IP is the same.

by Justin Ellingwood
The Apache web server is the most popular way to serve web content on the internet. Apache has the ability to serve multiple domains from a single server by using a mechanism called "virtual hosts". If a virtual host is configured correctly for each domain, the web server can correctly route traffic to the appropriate files based on the domain name requested. In this guide, we'll demonstrate how to configure Apache virtual hosts on an Ubuntu 14.04 VPS.
Have another answer? Share your knowledge.