httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremie Le Hen <jere...@le-hen.org>
Subject [users@httpd] Cannot use ServerName with a reverse proxy
Date Thu, 15 Mar 2007 20:05:23 GMT
Hi list,

I'm fiddling a bit with OpenBSD's default httpd(8) to create a very
simple reverse proxy.  Unfortunately, I'm experiencing a weird
behaviour when I use the ServerName directive.

The configuration file is straightforward:
%   ServerType standalone
%   ServerRoot "/var/www"
%   PidFile logs/httpd.pid
%   ScoreBoardFile logs/apache_runtime_status
%   
%   Listen 10.0.40.100:80
%   
%   User www
%   Group www
%   Port 80
%   ServerAdmin hostmaster@jeremie.vmware
%   ServerName proxy.jeremie.vmware
%   
%   UseCanonicalName On
%   
%   LogLevel debug
%   
%   LogFormat "%h %l %u %t \"%r\" %>s %b" common
%   CustomLog logs/access_log common
%   
%   LoadModule proxy_module /usr/lib/apache/modules/libproxy.so
%   <IfModule mod_proxy.c>
%       ProxyPass / http://www.jeremie.vmware/
%       ProxyPassReverse / http://www.jeremie.vmware/
%   </IfModule>

When I comment out the ServerName directive, the reverse proxy works.

When ServerName is used, it doesn't work anymore and I get the
following error message in Firefox:
%   Proxy Error
%   The proxy server could not handle the request GET /.
%   
%   Reason: Host not found

DNS names are correctly set:
%   tintin:/var/www/conf 223# host www.jeremie.vmware
%   www.jeremie.vmware is an alias for haddock80.jeremie.vmware.
%   haddock80.jeremie.vmware has address 10.0.80.200
%   www.jeremie.vmware is an alias for haddock80.jeremie.vmware.
%   www.jeremie.vmware is an alias for haddock80.jeremie.vmware.
%
%   tintin:/var/www/conf 224# host proxy.jeremie.vmware
%   proxy.jeremie.vmware is an alias for tintin40.jeremie.vmware.
%   tintin40.jeremie.vmware has address 10.0.40.100
%   proxy.jeremie.vmware is an alias for tintin40.jeremie.vmware.
%   proxy.jeremie.vmware is an alias for tintin40.jeremie.vmware.


As you can see, I asked for debug message in ErrorLog, but I can't
see anything relevant.  The only line issued when the query is made
is :
%    [Thu Mar 15 18:40:40 2007] [debug] proxy_cache.c(0): No CacheRoot,
%    so no caching. Declining.

Though this may appear quite off-topic, I tried to provide
httpd.conf(5) with a CacheRoot directive, but this doesn't resolve my
problem...  Instead I have the following messages:
%   [Thu Mar 15 18:42:31 2007] [debug] proxy_cache.c(0): Request for
%   http://www.jeremie.vmware/, pragma_req=(unset), ims=0
%   [Thu Mar 15 18:42:31 2007] [debug] proxy_util.c(0): File
%   /proxy/K/A/I/_dgyuc5xAy6ph@OoPlA not found
%   [Thu Mar 15 18:42:31 2007] [debug] proxy_cache.c(0): Local copy
%   not present or expired. Declining.


Any clue will be welcome!
Thank you.
Regards,
-- 
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >

---------------------------------------------------------------------
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