httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <Owen.Bo...@swx.com>
Subject RE: [users@httpd] Apache NamedVirtualHost + Squid in Accellerator mode problems
Date Fri, 06 Dec 2002 14:07:30 GMT
Don't know about squid or other cephalopods...

But is the apache server actually listening to 200.200.200.200? I think
not since you say this is the external IP. Also, what do foo.com  and
bar.br actually resolve to? Presumably the external IP...

I think you need:

>NameVirtualHost 192.168.1.1 
>
><VirtualHost 192.168.1.1>
>        DocumentRoot /home/httpd/html/foo
>        ServerName www.foo.com
>
><VirtualHost 192.168.1.1>
>        DocumentRoot /home/httpd/html/bar
>        ServerName www.bar.com.br

where 192.168.1.1 is the INTERNAL ip that apache actually listens to.
Note also the use of IP addresses instead of FQDNs in the <VH> tag. The
way you had it, if foo.com resolved to 200.200.200.200, then the VHs
would not match and you'd always get the first VH by default.

Rgds,
Owen Boyle

>-----Original Message-----
>From: Thiago Madeira de Lima [mailto:limat@ieg.com.br]
>Sent: Freitag, 6. Dezember 2002 14:32
>To: users@httpd.apache.org
>Subject: [users@httpd] Apache NamedVirtualHost + Squid in Accellerator
>mode problems
>
>
>
>    I'm having some trouble configuring apache as a content server,
>using squid as frontend to cache the requests.
>    My configuration points all my DNS As for squid external IP, squid
>then uses a rewrite script to redirect it to apache. Apache is in a
>private network. 
>
>	But the problem is that apache namevirtuahost directive is not
>working as it should.
>
>    From apache core documentation :
>
>   "In cases where a firewall or other proxy receives the requests and
>forwards them on a different IP address to the server, you must specify
>the IP address of the physical interface on the machine which will be
>servicing the requests"
>
>	My apache.conf looks just like this :
>
>NameVirtualHost 200.200.200.200 
>(this is the squid external ip address) 
>
><VirtualHost www.foo.com>
>        DocumentRoot /home/httpd/html/foo
>        ServerName www.foo.com
>        ErrorLog logs/www.foo.com-error_log
>        CustomLog logs/www.foo.com-access_log combined
></VirtualHost>
>
><VirtualHost www.bar.com.br>
>        DocumentRoot /home/httpd/html/bar
>        ServerName www.bar.com.br
>        ErrorLog logs/www.bar.com.br-error_log
>        CustomLog logs/www.bar.com.br-access_log combined
></VirtualHost>
>
>
>	When I request www.foo.com it works, but if i request
>www.bar.com.br it returns me www.foo.com content. Looks like the
>Namevirtualhost directive is not working. 
>
>
>	Anyone had this problem, or have a setup like that ? Any tips?
>Will I be able to make this work? 
>
>Thanks alot.
>Thiago Lima
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP 
>Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>

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 <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message