Re: ProxyPass work correctly but ReWriteRule has some error

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

 



On Thu, Jul 1, 2010 at 7:28 PM, Tom Evans <tevans.uk@xxxxxxxxxxxxxx> wrote:
> Look at your configuration again. First, ProxyPass
>
>      ProxyPass /olat http://192.168.1.5:8080/olat
>      ProxyPassReverse /olat http://192.168.1.5:8080/olat
>
> This says, when someone requests a URL starting with '/olat', proxy to
> 'http://192.168.1.5:8080/olat'
> It also says to rewrite some headers, but thats not important right now.
>
> Now, your RewriteRule version:
>
>      RewriteRule ^/olat/ http://192.168.1.5:8080/olat [P,L]
>
> This says, when someone requests a URL that begins with '/olat/',
> proxy to 'http://192.168.1.5:8080/olat'
>
>
> Can you really not see the difference?

Here you are saying about the / at the end is that what you mean?

> Let me show you with some URLs, and show what they get proxied to in
> each version. PR = Proxy rule, RR = Rewrite
>
> URL: /olat/
> PR: http://192.168.1.5:8080/olat/
> RR: http://192.168.1.5:8080/olat
When a request comes for /olat/ then it gets proxied to PR:
http://192.168.1.5:8080/olat/
and via RR it goes to PR: http://192.168.1.5:8080/olat
in this case I do not get the difference.
The url has a / at the end in PR so in RR also I should have a /
as you mentioned below

> URL: /olat/media/base.css
> PR: http://192.168.1.5:8080/olat/media/base.css
> RR: http://192.168.1.5:8080/olatmedia/base.css
>
> URL: /olat
> PR: http://192.168.1.5:8080/olat
> RR: None, attempts to serve the file /olat from your document root

Here why it tries to serve from DocumentRoot Not clear with this?


-- 
Tapas

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