I know this has been covered before and I've spent hours on this site and others trying to be sure I am doing everything correctly, but the bottom line is the rewrite isn't working - I keep on seeing the Apache default page and not the Zope page, and I am not getting any errors (I have trace5 on)
Here's the background: I finally had to move an ancient instance of Zope (2.4.4 w/Python 2.1) off an ancient server-the last move was in 2005! I actually managed to get Zope running on a 32 bit 16.04 VM using Azure's new nested Hyper-V - but that's another story :)
I basically copied everything over from the old server to the new one (including Python 2.1, Zope 2.4.4 and the Zope instance) to get this working, along with the Apache configuration files. The only thing new besides Ubuntu 16.04 (I had dapper on the old machine - no evil comments please :)) was Apache.
I've checked that I have rewrite
, proxy
and proxy_http
mods enabled. In the proxy.conf
I have proxyposts on
and allowed from localhost
. In the enabled-sites
conf file for the document root /
and /var/www/html
I AllowOverride All
and Require all granted
The condition I use is this:
RewriteEngine On RewriteRule ^/(.*) http://127.0.0.1:8083/VirtualHostBase/http/%{SERVER_NAME}:80/websites/jhom/VirtualHostRoot/$1 [L,P]
As note above, when I enter the site URL defined in the server name, I get the default Apache page without a rewrite. When I enter the URL defined in the rewrite into my browser (substituting the server name for localhost) I do get the site! So my assumption is there is something I am missing in the rewrite rule (I tried alternatives with that as well btw) or in getting rewrites to work at all.
If anyone has any good ideas I would greatly appreciate the help!
^/(.*)$
to force match the whole thing. I personally usually use Apache'sProxyPassMatch
&ProxyPassReverse
syntax, but rewrite rules with theP
flag (like you've got) ought to work, too. Look for path mismatches & the like.http://name.of.site:8082
w/o Apache.The Zope 2.4.4 seems hopeless although I can use view to see a page. That's good enough since the point of bringing these sites up is more to easily extract content for modernizing the sites.