Hey everyone, I'm trying to use a Virtual Host Monster along with Apache's mod_rewrite to publish some static content along with mostly Zope content. I've followed the How-To at http://www.zope.org/Members/mwr/VHosts_With_Zope_Default but I can't get it to work quite right. Here's the relevant section from httpd.conf: <VirtualHost 206.131.108.110> ServerName mendota.isd197.org DocumentRoot /var/www/district <IfModule mod_rewrite.c> RewriteEngine On RewriteLog "/var/log/apache/rewrite_log" RewriteLogLevel 1 RewriteRule ^/webalizer/ - [L] RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/www.mendota.isd197.org/mendota/Vi... [P] </IfModule> </VirtualHost> As you can see, I've got some Webalizer statistics I'd like to include along with the rest of the Zope stuff. The problem is that visiting http://www.isd197.org/mendota/ works perfectly, but http://mendota.isd197.org/ doesn't. In the second case, the main graphic on the page isn't visible. Any hints? -Tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.org | http://www.zope.org W. St. Paul, MN | | http://slashdot.org wilson@visi.com | <dtml-var pithy_quote> | http://linux.com
On Thu, Jun 14, 2001 at 11:39:51AM -0500, Timothy Wilson wrote:
The problem is that visiting http://www.isd197.org/mendota/ works perfectly, but http://mendota.isd197.org/ doesn't. In the second case, the main graphic on the page isn't visible. Any hints?
The real symptom is that the img tag in the working version is referring to http://www.isd197.org/mendota/ME_header, and in the non-working version, it's referring to http://www.isd197.org/ME_header - The base href tag is tied in with that, and is similar (http://www.isd197.org/mendota/ in the working version). I'd check the rewrite log -- A pair of working log entries from mine include: Apache-served content: 212.142.29.83 - - [14/Jun/2001:01:03:58 -0500] [www.cae.tntech.edu/sid#80b4514][rid#809de84/initial] (1) pass through /~mwr/zope_2.3.2-2_i386.deb Zope-served content (for www.cae.tntech.edu/help/): 129.79.17.223 - - [14/Jun/2001:12:51:08 -0500] [www.cae.tntech.edu/sid#80b4514][rid#809de84/initial] (1) go-ahead with proxy request proxy:http://localhost:9673/VirtualHostBase/http/www.cae.tntech.edu:80/CAE/Virtual... [OK] Compare with yours, and we'll see what turns up. -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- renfro@tntech.edu
From: "Timothy Wilson" <wilson@visi.com>
ServerName mendota.isd197.org
http://localhost:8080/VirtualHostBase/http/www.mendota.isd197.org/mendota/Vi rtualHostRoot/$1 The rewrite target should match the ServerName, and you should be setting the port explicitly: http://localhost:8080/VirtualHostBase/http/mendota.isd197.org:80/mendota/Vir tualHostRoot/$1 Cheers, Evan @ digicool & 4-am
participants (3)
-
Evan Simpson -
Mike Renfro -
Timothy Wilson