[Zope] Problems with virtual hosting

Frank Sonnemans frank.sonnemans@euronet.be
Mon, 23 Jul 2001 09:53:44 +0200


There were two issues:

1. My hosts file was not setup correctly for the virtual domain.

2. The example on the Howto mentions my.virtual.host.name in several 
places, but recommends using localhost instead of my.virtual.host.name (in 
the rewrite rules). I misinterpreted this and placed 127.0.0.1:8080 in the 
<VirtualHost my.virtual.host.name> field.

The apache documentation has an example listing simply:

NameVirtualHost real_host_ip_address
<VirtualHost real_host_ip_address>
  SeverName my.virtual.hostname
</VirtualHost>

<VirtualHost real_host_ip_address>
  ServerName my.other.virtualhost
</VirtualHost>


To me this is (a little) more clear, besides it eliminates the host name 
lookup. My recommendation is to put up a working example in the HowTo and 
point out the need for changing the hosts file or DNS. I would also 
recommend staying with the apache doc in putting the real_host in after 
NameVirtualHost and after VirtualHost.

The term my.virtual.host is (to me) unclear in that it could refer to the 
real virtual host address (umle.sbs-online.com:8080) or the proxied address 
(umle.sbs-online.com).

Anyways thanks for putting up the HowTo and thanks for the help.

Regards,


Frank




--On Sunday, July 22, 2001 18:00 -0500 Mike Renfro <renfro@tntech.edu> 
wrote:

> On Sun, Jul 22, 2001 at 11:13:28PM +0200, Frank Sonnemans wrote:
>
>> The NamevirtualHost xxx.xxx.xx.xxx and <VirtualHost xxx.xxx.xxx.xxx>
>> need to contain the IP address of the public web server
>> interface. The howto incorrectly states:
>>
>>       NameVirtualHost my.real.host.name
>>       <VirtualHost my.virtual.host.name>
>
> Well, the howto is written from my known working setup here, so it's
> not specifically incorrect. In fact, the actual lines from my Apache
> config read:
>
>   NameVirtualHost ch208h.cae.tntech.edu
>   <VirtualHost www.cae.tntech.edu>
>     ServerName www.cae.tntech.edu
>
> Now, there could be other issues with your local setup that using IP
> addresses happened to work around.  Things to check:
>
> - do you use extra IP address aliases on the Apache/Zope server? We're
>   only using one IP, and doing name-based virtual hosting.
>
> - are both forward and reverse DNS queries working? Are you avoiding
>   DNS entirely and using a hosts file?
>
> - Did the DNS administrator set up the virtual hosts as CNAMEs, or as
>   multiple A records?
>
> I'll certainly update the howto in the event I've done something
> wrong, or if your situation and workaround are commonplace.
>
> --
> Mike Renfro  / R&D Engineer, Center for Manufacturing Research,
> 931 372-3601 / Tennessee Technological University -- renfro@tntech.edu
>