httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Ionescu <bobsie...@googlemail.com>
Subject Re: [users@httpd] mod_rewrite on Windows with Apache 2.2
Date Tue, 30 Jun 2009 19:04:03 GMT
2009/6/30 tomcatastrophe <nabble@changethings.org>:
> Now I want to add URL rewriting for one of my hosts.
>
> I added my rules and directive to the virtual host (these work fine on
> Linux):
>
>     ProxyPreserveHost On
>     ProxyPassReverse / ajp://localhost:8009/
>     RewriteEngine On
>     RewriteRule ^/(.*)$ ajp://localhost:8009/$1 [P]
>
> But when trying to start Apache after doing this I get an error that the
> service failed to start.

You don't want to use mod_rewrite for such a simple reverse proxy by
mod_proxy. Use the directive ProxyPass instead. You'll need mod_proxy
and mod_proxy_ajp (you'll need them as well if you're using
mod_rewrite).

ProxyPreserveHost On
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/

> I've read all over about .htaccess files, etc, but I don't have any

I thought we're talking about the main server configuration file
(httpd.conf) and not a per-directory configuration file?!

Bob

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