Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I am a new user of webmin and I have two domains and

I have one dedicated IP for the server and I have set to use following name servers and with bind.

Now when I add on the same IP using the same method both sites open with the same content. How can I host both web sites on the same IP?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

The problem is that both domains are being pointed at the same hosting folder location.

If you have 2 sites labeled siteA and siteB you should have a folder structor something like this:

/home/siteA and /home/siteB or /var/www/siteA and /var/www/siteB these folders and the way domains point to them is called 'Virtual Hosts' You need to check your virtual host configuration and ensure that both directives are set and pointing in the correct location.

Depending on your Linux version the Apache configuration file may vary in location but typically its found in something like /etc/httpd/conf/httpd.conf or sites-enabled a Google search with your Linux version should give you an idea where your config file is located.

Once you located your virtual host file it should look something like:

<VirtualHost *:80>
DocumentRoot /home/siteA/htdocs
ServerAlias *

<VirtualHost *:80>
DocumentRoot /home/siteB/htdocs
ServerAlias *

There is many online guides on how to setup multiple vhosts using Webmin should you want some more advice other than my own a simple Google search should reveal a overwhelming amount.

share|improve this answer
Thank for your help, i just found apache2.conf in /etc/apache2 and here is my virtual host setting. <VirtualHost *:80> DocumentRoot "/var/www/" ServerName ServerAlias * </VirtualHost> <VirtualHost *:80> DocumentRoot "/var/www/" ServerName ServerAlias * </VirtualHost> sites are opening separately, that's worked for me. but here is still a problem even using ServerAlias doesn't open with-out www it works with how to handle this prob. error is " don't have permission to access / on this server. Thanks – user838037 Mar 2 '13 at 21:28
Make sure your name servers are setup correctly with the www @ ip – Simon Hayter Mar 2 '13 at 21:39

[not a answer, just to sort order my code] @bybe, still getting problem doesn't' work. server ip : domain registrar with rdns: here is my Edit Records File /var/lib/bind/

$ttl 38400   IN  SOA 192-168-1-100.local. (
            38400 )  IN  A   IN  A   IN  A  IN  NS  IN  NS  IN  CNAME
*    IN  A IN  A  IN  MX  1  IN  NS  192-168-1-100.local.

and here my virtualhost setting

<VirtualHost *:80>
DocumentRoot /var/www/
<Directory "/var/www/">
allow from all
Options +Indexes
ServerAlias *

other site on this server working perfectly with this same configuration. but don't know here what i am doing wrong. let me know where is problem. thank you

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.