Re: [EMAIL PROTECTED] Debugging virtual hosts?

2006-09-14 Thread Steve Swift
>Incidentally, this is something to check; is your client really sending>a Host header? To do so, it must be using HTTP/1.1 (all modern browsers>do so). Please confirm that you are using a recent browser to test this
>server.A quick test would be to go to http://www.swiftys.org.uk as this is a (non-default) virtual host on a system using name-based virtual hosts. If you get to "Swifty's Home Page" then your browser is sending the "host" value in its HTTP header.
-- Steve Swifthttp://www.swiftys.org.uk


RE: [EMAIL PROTECTED] Debugging virtual hosts?

2006-09-14 Thread Boyle Owen
> -Original Message-
> From: Steve Swift [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 14, 2006 8:59 AM
> To: users@httpd.apache.org
> Subject: Re: [EMAIL PROTECTED] Debugging virtual hosts?
> 
> I know of no way to trace the mechanism that Virtual Hosts 
> uses, but from observation of several working systems, and 
> close scrutiny of the documentation, it goes mostly like this:

Steve's response is right on the money; Just to clarify some points:

> 
> 1. Read the "NameVirtualHost xxx" directive to identify which 
> address/ports activate Virtual Hosts. 
>  On match, proceed to step 2.  In my case this is *:80 - 
> port 80 on any adapter.
> 2. Now look through the  directives. I'm not 
> sure if the xxx is matched against the xxx in the 
> NameVirtualHost directive or the interface/port in use. 

It is matched against the NameVirtualHost argument.

> Keep 
> them the same unless you know better! 
> For each matching VirtualHost directive, see if the 
> included "ServerName" directive matches the server name from 
> the client (the users browser)

ie; the "Host" header in the request.

Incidentally, this is something to check; is your client really sending
a Host header? To do so, it must be using HTTP/1.1 (all modern browsers
do so). Please confirm that you are using a recent browser to test this
server.

If you are in doubt, try logging it (%{Host}i in CustomLog, see
http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#customlog)

I notice that your server has an IP address of 192.168.1.2, so it's a
LAN. Hence you must be behind a router or FW that connects you to the
internet. Are you sure that component is not removing headers from the
request?

Assuming not, are you sure that you are accurately transcribing the
hostnames from the browser to the server config (you already made one
typo on this...)

Finally, is this stuff really on the public internet or is it all on the
LAN? If so, are you sure DNS is working on the client machine (it's not
on the server - hence the warning when you start up).

It would be better if you wouldn't hide all the hostnames - we're not so
sure if this is a real error or some typo somewhere...

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

>If the servername matches, then look no further... use 
> this virtual host 
>If no servername matches in any virtualhost then use the 
> first virtualhost that matched the NameVirtualHost directive. 
>   You are most likely falling foul of this mechanism
> 
> 
> On 14/09/06, bwobbones <[EMAIL PROTECTED]> wrote:
> 
> 
>   Thanks for the reply,
>   
> Sorry, a mis-communication.  I mean process as in a 
> series of steps.  I.e.
>   is there some way of getting httpd to print out the 
> sequence of steps that
>   it is using to determine which vhost to go to? 
>   
> 
> 
> -- 
> Steve Swift
> http://www.swiftys.org.uk 
>
 
 
This message is for the named person's use only. It may contain confidential, 
proprietary or legally privileged information. No confidentiality or privilege 
is waived or lost by any mistransmission. If you receive this message in error, 
please notify the sender urgently and then immediately delete the message and 
any copies of it from your system. Please also immediately destroy any 
hardcopies of the message. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the intended 
recipient. The sender's company reserves the right to monitor all e-mail 
communications through their networks. Any views expressed in this message are 
those of the individual sender, except where the message states otherwise and 
the sender is authorised to state them to be the views of the sender's company.

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] Debugging virtual hosts?

2006-09-14 Thread Steve Swift
I know of no way to trace the mechanism that Virtual Hosts uses, but from observation of several working systems, and close scrutiny of the documentation, it goes mostly like this:1. Read the "NameVirtualHost xxx" directive to identify which address/ports activate Virtual Hosts. 
 On match, proceed to step 2.  In my case this is *:80 - port 80 on any adapter.2. Now look through the  directives. I'm not sure if the xxx is matched against the xxx in the NameVirtualHost directive or the interface/port in use. Keep them the same unless you know better!
    For each matching VirtualHost directive, see if the included "ServerName" directive matches the server name from the client (the users browser)   If the servername matches, then look no further... use this virtual host
   If no servername matches in any virtualhost then use the first virtualhost that matched the NameVirtualHost directive.   You are most likely falling foul of this mechanismOn 14/09/06, 
bwobbones <[EMAIL PROTECTED]> wrote:
Thanks for the reply,  Sorry, a mis-communication.  I mean process as in a series of steps.  I.e.is there some way of getting httpd to print out the sequence of steps thatit is using to determine which vhost to go to?
-- Steve Swifthttp://www.swiftys.org.uk


Re: [EMAIL PROTECTED] Debugging virtual hosts?

2006-09-13 Thread bwobbones

Thanks for the reply,

  Sorry, a mis-communication.  I mean process as in a series of steps.  I.e.
is there some way of getting httpd to print out the sequence of steps that
it is using to determine which vhost to go to?



William A. Rowe, Jr. wrote:
> 
> bwobbones wrote:
>> Hi,
>> 
>>   Does anyone know how I can see the process by which apache is working
>> out
>> which vhost to go to?  I've got a problem where it's always going to the
>> default (http://www.nabble.com/More-Virtual-Host-problems-tf2265477.html)
> 
> Unless you run perchild or memutex (sp?) MPMs - then the requests go
> round robin to each worker process.
> 
> It's not the process you are looking for - it's the  block
> you want to pay attention to.  Make sure VirtualHost argument matches your
> NameVirtualHost directive, make sure ServerName is right for each.
> 
> -
> The official User-To-User support forum of the Apache HTTP Server Project.
> See http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: [EMAIL PROTECTED]
>"   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Debugging-virtual-hosts--tf2269012.html#a6298272
Sent from the Apache HTTP Server - Users forum at Nabble.com.


-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] Debugging virtual hosts?

2006-09-13 Thread William A. Rowe, Jr.
bwobbones wrote:
> Hi,
> 
>   Does anyone know how I can see the process by which apache is working out
> which vhost to go to?  I've got a problem where it's always going to the
> default (http://www.nabble.com/More-Virtual-Host-problems-tf2265477.html)

Unless you run perchild or memutex (sp?) MPMs - then the requests go
round robin to each worker process.

It's not the process you are looking for - it's the  block
you want to pay attention to.  Make sure VirtualHost argument matches your
NameVirtualHost directive, make sure ServerName is right for each.

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED] Debugging virtual hosts?

2006-09-13 Thread bwobbones

Hi,

  Does anyone know how I can see the process by which apache is working out
which vhost to go to?  I've got a problem where it's always going to the
default (http://www.nabble.com/More-Virtual-Host-problems-tf2265477.html)

Thanks,

Greg
-- 
View this message in context: 
http://www.nabble.com/Debugging-virtual-hosts--tf2269012.html#a6297776
Sent from the Apache HTTP Server - Users forum at Nabble.com.


-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]