Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

setting up multiple domain names

Status
Not open for further replies.

caesarkim

Programmer
Oct 30, 2003
56
US
I am trying to set up the multiple domain names in Apache 2.
let's I have a domain name that needs to be bound to xx.xx.xx.xxx ip address.

But even though I specify like the following, it doesn't work. I have to type
<VirtualHost xx.xx.xx.xxx:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot E:/ ServerName ErrorLog logs/test.com-error_log
CustomLog logs/test.com-access_log common
</VirtualHost>

The base document root is "E:/
is there any other setting that I need to take a look at?

I am using windows 2003 server.
 
Hi

Then theoretically you have to set only the main [tt]DocumentRoot[/tt] to that directory. So just change the directive outside the [tt]VirtualHost[/tt] section :
Code:
DocumentRoot E:/[URL unfurl="true"]www/test[/URL]
In this case of course, those documents which was available until now under [navy][ignore]www.test.com[/ignore][/navy], no longer will be served.

My previous question was not clear at all, so I try again : what is serving that Apache now, from which directory, for which URL ?

Feherke.
 
But if I change DocumentRoot to E:/ outside the VirtualHost, don't all requests go to that directory?

But there will be multiple domain names running on the Apache.

Let's say that I have 3 domain names that need to be bound to a different ip address.

- 64.xx.xx.112
- 64.xx.xx.113
- 64.xx.xx.114

But now, if i type the page that is under DocumentRoot outside VirtualHost instead of DocumentRoot inside VirtualHost shows up. There are folder names, "test1", "test2" and "test3" under E:/ That's why if i type then the page under DocumentRoot inside VirtualHost shows up. So in order to access i have to type instead of
I just want to make the URL specific default page (meaning the DocumentRoot inside VirtualHost) show up.

I am not sure that it is clear now.
 
Hi

Now it is clear. Sadly, I never had to use virtual hosts with different IP addresses, and I have no available Apache to make some tries.

I hope someone else knows an exact answer, if not, I will try resurrecting our server tomorrow.

Feherke.
 
You can try a

NameVirtualHost xx.xx.xx.xxx

in front of the

<VirtualHost xx.xx.xx.xxx:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot E:/ ServerName ErrorLog logs/test.com-error_log
CustomLog logs/test.com-access_log common
</VirtualHost>
 
Do the IP addresses exist? Can you ping them? If not, fix it. That should solve most of your problem.

[tt]netstat -nap[/tt] will show you what addresses/ports the server is listening on.

Good luck...
 
Never mind the "p" option you're on windows. If you're on XP you can substitute "o" for the "p" option.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top