Apache Vhosts + Multi Domain + Name Server

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Apache Vhosts + Multi Domain + Name Server

Postby paladera » 24. May 2011 13:32

Hello everyone,

I have a small problem, i have a multi domain hosting box, what i am stuck is if i am even doing it right, the main domain is domain1.com and i need to get all other domains to be pointed to ns1.domain1.com and ns2.domain1.com could anyone help?

Here is a example of what i am doing,

Code: Select all

<VirtualHost *:80>
    ServerAdmin admin@domain1.com
    DocumentRoot "K:/Webpage Server/htdocs/domain1.com"
    ServerName domain1.com
    ServerAlias www.domain1.com
    ErrorLog "logs/domain1.log"   

<VirtualHost *:80>
    ServerAdmin admin@domain2.com
    DocumentRoot "K:/Webpage Server/htdocs/domain2.com"
    ServerName domain2.com
    ServerAlias www.domain2.com
    ErrorLog "logs/domain2.log"   

<VirtualHost *:80>
    ServerAdmin admin@domain3.com
    DocumentRoot "K:/Webpage Server/htdocs/domain3.com"
    ServerName domain3.com
    ServerAlias www.domain3.com
    ErrorLog "logs/domain3.log"   

Please help!
Posts: 2
Joined: 24. May 2011 13:25

Re: Apache Vhosts + Multi Domain + Name Server

Postby taustin » 25. May 2011 23:45

I'm not quite sure what you're trying to do, but it sounds like you're talking about pointing the domains to the correct name servers. Is that correct? That is a setting in your domain registration, with whomever your domains are registered with, not something on your web server.
Posts: 150
Joined: 24. September 2004 00:23
Location: Huntington Beach CA

Re: Apache Vhosts + Multi Domain + Name Server

Postby paladera » 26. May 2011 02:28

I did point the domain and it seems not to propagate no more, i used to own a Linux box and use EHCP and it would configure this but decided to go to windows, but now i cant quite figure out why its not working.
Posts: 2
Joined: 24. May 2011 13:25

Re: Apache Vhosts + Multi Domain + Name Server

Postby Sharley » 26. May 2011 06:15

You should try by using only 1 of your domains first and if that works then add another and when that works add the last domain or you will never know which domain may be giving issues.

Next, you have missed an important entry before your vhost containers.

Add this
Code: Select all
NameVirtualHost *:80
to the top of your vhost entries, save the file and restart Apache.

Read your \apache\logs\error.log and access.log files for clues at about the date and time you last started Apache and tried the URL in your browser.

By the way where did you install the XAMPP files (full path)?

Remember that XAMPP for Windows is a very insecure web server environment specifically designed for developing at localhost level and should not be used for a production (live to the Internet) situation unless you are very familiar with the processes of hardening an Apache Windows web server.
User avatar
AF Moderator
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 64 guests