Re: [users@httpd] RewriteRule problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/14/05, Arne Heizmann <Arne.Heizmann@xxxxxxx> wrote:
> 
> Hi,
> 
> I get a 403 Forbidden when trying to use a RewriteRule to proxy a
> request to another server.
> 
> I have two servers, ukrbcsr01 and ukrbcsr02. ukrbcsr02 is accessible
> from the outside, ukrbcsr01 isn't. Their LAN IPs are 192.168.0.131 and
> 192.168.0.132, respectively. I can access one from the other, so I know
> that both Apaches are running correctly and the LAN is working.
> 
> Now I added the following RewriteRule to ukrbcsr02:
> 
>         RewriteEngine On
>         RewriteRule ^/old/(.*) http://ukrbcsr01/$1 [P]
> 
> I was hoping that [P] would work to proxy the request to the other
> server, but what I get instead is a 403 Forbidden when I try to access
> /old/something. I get the same 403 even when I stop the Apache on
> ukrbcsr01, so it must be ukrbcsr02 that generates the Forbidden message
> without even attempting to proxy the request.

Did you configure you apache to allow proying? It looks like your
apache on the first server simply doesn't allow proxying.

You need something like this in your apache: 
(and the proxy module needs to be available, ofcoures)

 ProxyRequests Off

<Proxy *>
    Order deny,allow
    Allow from all
</Proxy>

If your requirements are simple there is no need to use a rewrite rule
for you proxying. Use for example:


ProxyPass /old http://ukrbcsr01/
ProxyPassReverse /old http://ukrbcsr01/

Krist


-- 
krist.vanbesien@xxxxxxxxx
Solothurn, Switzerland

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux