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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache Subdomain Config Qu.

Status
Not open for further replies.

Sudmill

Programmer
Apr 20, 2001
65
GB
Hi,

Im trying to configure the httpd.conf file so that my apache (1.3.19) resolves the following browser lookups.

intranet.server.myco.co.uk -> "D:\htdocs\intranet\html"
server.myco.co.uk -> "D:\Program Files\IBM HTTP Server\htdocs"

This is an internal (intranet) server, and the above two domains have been set up at DNS level to resolve to the server (which works), but I cannot get apache to differntiate between the two requests.

Both browser requests always seems to resolve to the "D:\htdocs\intranet\html" dir, regardless of the virtual host order !

If I take out all the virtual host stuff, then it just goes to "D:\Program Files\IBM HTTP Server\htdocs", as expected.


What the h3ll am I doing wrong in this file? ( I have a feeling this is an easy one!)


My httpd.conf file is as follows;
- - - - - - - - - - - -
ServerName server.myco.co.uk
ServerType standalone
ServerRoot "e:/Program Files/IBM HTTP Server"
Port 80
HostNameLookups On
BindAddress *
UseCanonicalName On

<VirtualHost * >
DocumentRoot &quot;D:\htdocs\intranet\html&quot;
ServerName intranet.server.myco.co.uk
</VirtualHost>

<VirtualHost * >
DocumentRoot &quot;D:\Program Files\IBM HTTP Server\htdocs&quot;
ServerName server.myco.co.uk
</VirtualHost>

DocumentRoot &quot;d:/Program Files/IBM HTTP Server/htdocs&quot;
DirectoryIndex index.html
- - - - - - - - - - - -



Thanks in advance for any suggestions, (perhaps I can stop banging my head against the wall soon! )
Cheers

John (Sudmill)
 
Ok, thanks for the swift reply, but the is still a problem.

Now it seems which ever of the two virtual host definitions is listed first in the httpd.conf file, that is the domain that is resolved for both of the following URLS;


So they are still not working independantly. Any ideas? Cheers

John (Sudmill)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top