Re: ProxyPass work correctly but ReWriteRule has some error

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

 



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?

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

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

I hope you can understand why now.

Cheers

Tom

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