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!

Converting windows server based apache from multi ip based virtual to multi name based virtual

Status
Not open for further replies.

BobMCT

IS-IT--Management
Sep 11, 2000
756
US
[ponder]
While I've been using and configuring apache for a long time I now have a situation on a windows 2008 server originally configured with multiple IP support mapped to separate virtual servers. I've always used name based virtual servers and when I tried to introduced named based to the config the server wouldn't work.

So can anyone please provide some pointers as to how one can convert multiple IP based virtual servers to multiple name based virtual servers?

Thanks in advance.
 
Define "wouldn't work"

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Sorry for being unclear. Wouldn't work meaning that the virtual web defined would yield no web page however I could see no apache config errors using http to test the config. Being a remote win 2008 R2 machine makes tracking down all the errors rather difficult if not impossible. Hope this helps a little.
 
something like the following maybe? unless you mean something else

Code:
<VirtualHost 192.168.0.1:80>
ServerAdmin webmaster@example1.com
DocumentRoot /var/[URL unfurl="true"]www/example1.com[/URL]
ServerName [URL unfurl="true"]www.example1.com[/URL]
</VirtualHost>

<VirtualHost 192.168.0.2:80>
ServerAdmin webmaster@example2.com
DocumentRoot /var/[URL unfurl="true"]www/example2.com[/URL]
ServerName [URL unfurl="true"]www.example2.com[/URL]
</VirtualHost>

``The wise man doesn't give the right answers,
he poses the right questions.''
TIMTOWTDI
 
Thanks for the follow up. I think I figured it out. The actual IP for each virtual host section defines the ONLY IP that is accepted for this particular virtual server. The ServerName declaration within defines what url request it accepts within. So, multiple virtual host sections can/will have the same IP but each has different server name declarations.

FWIW - I think using NameVirutalServer is much, much easier.

Thanks again. [ponder]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top