|
Home > Archive > Web Servers on Unix and Linux > June 2007 > Apache reverse proxy
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Apache reverse proxy
|
|
| Branimir Pejakovic 2007-06-23, 7:23 am |
| Hello group!
I would appreciate if someone could help me. I use a reverse proxy on
Apache. The most simple "case" works like a charm:
For example:
ProxyPass /goProxy/ http://unix.example.com/
ProxyPassReverse /goProxy/ http://unix.example.com/
but when I want to do this:
ProxyPass /goProxy/ http://unix.example.com/script.php?value=1
ProxyPassReverse /goProxy/ http://unix.example.com/script.php?value=1
I get an error 404. Now, I know that I have to use mod_rewrite and I
tried that but with partial results. It does what I want but with
unwanted effect - when I go to URL of a server that "proxies" request to
the backend server (www.example.com), it doesn't show its index.html but
it still proxies requests to the backend server. I have been trying this
for two days. I am a beginner concernig mod_rewrite and I am begging if
anyone could give me some general mod_rewrite rules for the example
mentioned above.
Thank you in advance!
Branimir
| |
|
| Branimir Pejakovic wrote:
> I would appreciate if someone could help me. I use a reverse proxy on
> Apache. The most simple "case" works like a charm:
>
> For example:
>
> ProxyPass /goProxy/ http://unix.example.com/
> ProxyPassReverse /goProxy/ http://unix.example.com/
>
> but when I want to do this:
>
> ProxyPass /goProxy/ http://unix.example.com/script.php?value=1
> ProxyPassReverse /goProxy/ http://unix.example.com/script.php?value=1
>
> I get an error 404. Now, I know that I have to use mod_rewrite and I
> tried that but with partial results. It does what I want but with
> unwanted effect - when I go to URL of a server that "proxies" request to
> the backend server (www.example.com), it doesn't show its index.html but
> it still proxies requests to the backend server. I have been trying this
> for two days. I am a beginner concernig mod_rewrite and I am begging if
> anyone could give me some general mod_rewrite rules for the example
> mentioned above.
It's not clear to me exactly what your problem is, but I would
recommend reading the web page below. I managed to implement a
rather complex reverse proxy with the information provided here.
http://www.apachetutor.org/admin/reverseproxies
Good Luck,
Jeff
|
|
|
|
|