[Zope] More VHM + apache + images trouble

Timothy Wilson wilson@visi.com
Thu, 27 Dec 2001 13:55:46 -0600 (CST)


Hi everyone,

I'd like to add a "me too" to Dean's question about broken images when
using VHM and apache rewrite rules.

Here's my configuration:

I've got Zope running on port 8080 with the following rewrite rules in
my httpd.conf file:

<VirtualHost 10.0.0.2> #IP 208.42.140.222
  ServerName www.qwerk.org
  DocumentRoot /var/www/qwerk.org
  ServerAlias qwerk.org *.qwerk.org
 
  RewriteEngine On
  RewriteLogLevel 0
  RewriteLog "/var/log/apache/rewrite_log"
  RewriteRule ^/mailman/ - [L]
  RewriteRule ^/webalizer/ - [L]
  RewriteRule ^/~(.*) - [L]
  RewriteRule
^/(.*) http://www.qwerk.org:8080/VirtualHostBase/http/www.qwerk.org/Wilson/VirtualHostRoot/$1
[P]
</VirtualHost>

The last rule rewrites requests for http://www.qwerk.org to
http://www.qwerk.org:8080/Wilson/. Everything works perfectly when I
visit http://www.qwerk.org:8080/Wilson/, but the main image is broken if
you go to http://www.qwerk.org/.

If you view the HTML source at http://www.qwerk.org/ you'll see that
href for the image is clearly wrong. It leaves out the /Wilson.

Unfortunately, the rewrite logs don't reveal much to me:

10.0.0.3 - - [27/Dec/2001:14:14:13 -0600]
[www.qwerk.org/sid#80aec5c][rid#80c412c/initial] (2) init rewrite engine
with requested uri /
10.0.0.3 - - [27/Dec/2001:14:14:13 -0600]
[www.qwerk.org/sid#80aec5c][rid#80c412c/initial] (3) applying pattern
'^/mailman/' to uri '/'
10.0.0.3 - - [27/Dec/2001:14:14:13 -0600]
[www.qwerk.org/sid#80aec5c][rid#80c412c/initial] (3) applying pattern
'^/webalizer/' to uri '/'
10.0.0.3 - - [27/Dec/2001:14:14:13 -0600]
[www.qwerk.org/sid#80aec5c][rid#80c412c/initial] (3) applying pattern
'^/~(.*)' to uri '/'
10.0.0.3 - - [27/Dec/2001:14:14:13 -0600]
[www.qwerk.org/sid#80aec5c][rid#80c412c/initial] (3) applying pattern
'^/(.*)' to uri '/'
10.0.0.3 - - [27/Dec/2001:14:14:13 -0600]
[www.qwerk.org/sid#80aec5c][rid#80c412c/initial] (2) rewrite / ->
http://www.qwerk.org:8080/VirtualHostBase/http/www.qwerk.org/Wilson/VirtualHostRoot/
10.0.0.3 - - [27/Dec/2001:14:14:13 -0600]
[www.qwerk.org/sid#80aec5c][rid#80c412c/initial] (2) forcing
proxy-throughput with
http://www.qwerk.org:8080/VirtualHostBase/http/www.qwerk.org/Wilson/VirtualHostRoot/
10.0.0.3 - - [27/Dec/2001:14:14:13 -0600]
[www.qwerk.org/sid#80aec5c][rid#80c412c/initial] (1) go-ahead with proxy
request
proxy:http://www.qwerk.org:8080/VirtualHostBase/http/www.qwerk.org/Wilson/VirtualHostRoot/
[OK]

Any advice would be appreciated.

-Tim

--
Tim Wilson      |   Visit Sibley online:   | Check out:
Henry Sibley HS |  http://www.isd197.org   | http://www.zope.com
W. St. Paul, MN |                          | http://slashdot.org
wilson@visi.com |  <dtml-var pithy_quote>  | http://linux.com