Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: One Apache Virtual Hosts Config Guru Required! |
|
Author |
|
Flextasmic
Joined: 05 Dec 2006 Posts: 2
|
Posted: Tue 05 Dec '06 15:16 Post subject: One Apache Virtual Hosts Config Guru Required! |
|
|
Howdy, I'm upgrading from Apache 1.3 to 2 and have a problem with setting up my virtual hosts.
I've gone over the config file with a fine tooth comb and my DNS settings are smashing (as they worked with Apache 1.3) but I still have no luck.
I have around 5 virtual hosts and sub domains setup, but every sub domain I go to always points to the first virtual host config (quotes.vbilimited.com, obviously the default) and ignores the virtual config relating to the domain.
Any help would be much appreciated!
Cheers |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Tue 05 Dec '06 16:04 Post subject: |
|
|
Which version of Apache 2 do you use, 2.0.x or 2.2.x ?
Quote: |
my DNS settings are smashing
|
Any error message in the error.log ?
Please post that part with the vhost from your httpd.conf. Of not we can only guessing what is going wrong.
Namebased Vhosts Reference |
|
Back to top |
|
Flextasmic
Joined: 05 Dec 2006 Posts: 2
|
Posted: Tue 05 Dec '06 17:41 Post subject: |
|
|
Ok, sorry about my lack of info...
I'm running Apache 2.0.x.
The vhosts section is...
Quote: | NameVirtualHost *:80
# Internally Developed Apps (development)
Include conf/virtualhosts/quotes.dev.vbilimited.com.conf
Include conf/virtualhosts/partsmaster.dev.vbilimited.com.conf
Include conf/virtualhosts/vbicontactnumbers.dev.vbilimited.com.conf
Include conf/virtualhosts/global.dev.vbilimited.com.conf |
And a config file in the 'virtualhosts' folder contains for example...
Quote: | ## quotes.dev.vbilimited.com
## - Development site for vbi quotes flex application
##
<VirtualHost *:80>
ServerName quotes.dev.vbilimited.com
DocumentRoot "G:/htdocs/Development/quotes.dev.vbilimited.com"
ServerAdmin whatever@wherever.dunno
ErrorLog "G:/logs/quotes.dev.vbilimited.com/error.log"
CustomLog "G:/logs/quotes.dev.vbilimited.com/access.log" combined
Alias /icons/ "c:/program files/apache2/icons/"
# Next allow statements just from VBI Network
<Directory "g:/htdocs/Development/quotes.dev.vbilimited.com">
Order deny,allow
Deny from all
Allow from 10.1.0.0/16
Allow from 10.3.0.0/16
# Allow from Blackburn VBi (External)
Allow from 217.154.243.0/24
# Allow from bit10
Allow from 217.154.146.0/24
Allow from 212.219.179.0/24
allow from 217.33.6.0/24
</Directory>
</VirtualHost> |
All of the other config files are setup in the same way but obviously have different server names and directory paths. This is the virtual host that is always used because obviously this is the default. None of the others take effect and I dont know why. e.g http://partsmaster.dev.vbilimited.com still points to the quotes.dev.vbilimited.com directory even thought it's setup to point to g:/htdocs/Development/partsmaster.dev.vbilimited.com.
Hope that helps! |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Wed 06 Dec '06 18:52 Post subject: |
|
|
This command (executed in your Apache bin directory) Quote: | Apache.exe -t -D DUMP_VHOSTS | will show you which virtual hosts are recognized at startup.
Is there anything in G:/logs/partsmaster.dev.vbilimited.com/access.log or in G:/logs/partsmaster.dev.vbilimited.com/error.log
after you make a request to http://partsmaster.dev.vbilimited.com/ ?
Setting up a few virtual hosts with Apache 2.0.55 by copying & pasting your <VirtualHost> stanza worked fine for me.
I used different DocumentRoots, ServerNames, Allows, and my Apache 2.0.55 is installed in C:/Program Files/Apache Group/Apache2
rather than c:/program files/apache2; but I don't see why any of these things would make a difference.
-tom- |
|
Back to top |
|
|
|
|
|
|