httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zac Stevens <...@cryptocracy.com>
Subject Re: [users@httpd] redirect permanent statements inside virtualhost seem to be ingored
Date Sat, 30 Aug 2003 00:18:57 GMT
Hi Bill,

On Fri, Aug 29, 2003 at 12:14:20PM -0400, Bill Moran wrote:
[lots of stuff snipped]
> <VirtualHost 66.167.251.9:80>
> ProxyPass        / http://master-new.3dresearch.com/
> ProxyPassReverse / http://www.3dresearch.com/
> ServerName   www.3dresearch.com
> ServerAdmin  admin@3dresearch.com
> 
> Redirect 301 /libertarian http://www.3dresearch.com/~libertarian
> Redirect 301 /travel http://www.3dresearch.com/~travel-nt
> </VirtualHost>
> 
> To all appearances, Apache is completely ignoring that statement
> Any idea why?  Am I missing something obvious?

Because it should be!  Generating a Redirect requires that Apache handle
the request itself, when you've already told it that everything under the
root of yoursite should be proxied to the backend.  The Redirects you've
added are valid, but Apache will never use them infulfilling requests
because they are proxied before it has a chance.

Another poster suggested generating the redirects on the backend server
which is probably the best way to go - you'll probably come to regret 
having config for your website scattered across multiple machines anyway,
even if it is just a few non-critical Redirects.

If the backend server is not Apache, or you're otherwise unable to do the
Redirects there, you should be able to use mod_rewrite on the frontend.
This will get the job done, but the performance cost will be higher - stick
with Redirects if you can.

I would also imagine that you're experiencing problems caused by the
incorrect ProxyPassReverse statement - the URL argument should be the
backend server, same as for ProxyPass.


Cheers,


Zac

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