Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to set up Zenoss to work with https://server/zenoss instead of https://server. Here's my rewrite rule:

RewriteEngine On
RewriteRule ^/zenoss($|/.*) http://localhost:8080/VirtualHostBase/https/server:443/VirtualHostRoot/zenoss$1 [L,P]

This way doesn't work. I get:

Site error

An error was encountered while publishing this resource. The requested resource does not exist. Please click here to return to the Zenoss dashboard

The url for "Please click here to return to the Zenoss dashboard" points to https://server/zport/dmd

However, it does work if I do it the standard Zenoss/Plone/Zope way:

RewriteEngine On
RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/https/server:443/VirtualHostRoot/$1 [L,P]

... it works great.

According to this article, it seems like the first way should work. I'm not really sure what I'm missing.

share|improve this question
up vote 1 down vote accepted

You've got an extra zenoss in your first RewriteRule (and you're also doubling up on slashes). It reads:

RewriteRule ^/zenoss($|/.*) http://localhost:8080/VirtualHostBase/https/server:443/VirtualHostRoot/zenoss$1 [L,P]

It should be:

RewriteRule ^/zenoss($|/.*) http://localhost:8080/VirtualHostBase/https/server:443/VirtualHostRoot$1 [L,P]
share|improve this answer
Thanks, but I'm still getting redirected to server/zport/dmd with that rule. – churnd May 10 '11 at 2:56
You aren't trying to do this in a .htaccess, are you? If not, fire up some rewrite logging and figure out what's going in and what's coming out of the RewriteRule. – BMDan May 14 '11 at 0:37
No, I'm putting it in the apache configuration file. The only thing I can see in the Apache error logs is: [Mon May 23 11:40:17 2011] [error] [client] File does not exist: /var/www/html/zenoss [Mon May 23 11:40:17 2011] [error] [client] File does not exist: /var/www/html/favicon.ico – churnd May 23 '11 at 15:42
How about: RewriteRule ^/zenoss($|/.*) http://localhost:8080/VirtualHostBase/https/server:443/VirtualHostRoot/$1 [L,P]. If this doesn't work, either turn on RewriteLog, or do a manual request (e.g. links 'http://localhost:8080/VirtualHostBase/https/server:443/VirtualHostRoot/'). – BMDan May 24 '11 at 1:04
That rewrite rule didn't work either. I get the same error. I don't know how to turn on RewriteLog. The manual request works directly on the server. – churnd May 24 '11 at 15:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.