You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by al...@oracle.com on 2006/02/14 18:08:23 UTC
[users@httpd] Apache 2 on Suse 9.1 Reverse Proxy not working
Hi all,
I have tried to use the Apache Week article to set up reverse proxy. It is being installed on a SuSE 9 Linux x86 box running Apache 2. I have configured it as per the notes, but am getting errors which I'm thinking is to do with the rewriting of the URL. Below is the error messages, as well as the configuration.
The only thing which I've done different, is to use a copy of the mod_proxy_html.so from a mandrake rpm (for x586).
******
Steps
******
Precursor:
Set up Reverse Proxy as per Apache Week page (http://www.apacheweek.com/features/reverseproxies)
NOTE: Difference is that I removed trailing / from ProxyPass commands
1. issue the following URL: http://lucas.delexian.com/ocs
2. Server responds with rewrite of URL: http://lucas.delexian.com/welcome/index.jsp
3. However, server message is:
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
lucas.delexian.com
Wed Feb 15 00:09:03 2006
Apache/2.0.49 (Linux/SuSE)
****************
Apache Error Log
****************
[Wed Feb 15 00:08:58 2006] [notice] SIGUSR1 received. Doing graceful restart
[Wed Feb 15 00:08:58 2006] [info] Init: Initializing OpenSSL library
[Wed Feb 15 00:08:58 2006] [info] Init: Seeding PRNG with 0 bytes of entropy
[Wed Feb 15 00:08:58 2006] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Wed Feb 15 00:08:59 2006] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Wed Feb 15 00:08:59 2006] [info] Init: Initializing (virtual) servers for SSL
[Wed Feb 15 00:08:59 2006] [info] Server: Apache/2.0.49, Interface: mod_ssl/2.0.49, Library: OpenSSL/0.9.7d
[Wed Feb 15 00:08:59 2006] [notice] Apache/2.0.49 (Linux/SuSE) configured -- resuming normal operations
[Wed Feb 15 00:08:59 2006] [info] Server built: Jun 30 2004 22:22:01
[Wed Feb 15 00:08:59 2006] [debug] worker.c(1631): AcceptMutex: sysvsem (default: sysvsem)
[Wed Feb 15 00:09:03 2006] [debug] proxy_http.c(66): proxy: HTTP: canonicalising URL //lucas.delexian.com:8009
[Wed Feb 15 00:09:03 2006] [debug] mod_proxy.c(416): Trying to run scheme_handler
[Wed Feb 15 00:09:03 2006] [debug] proxy_http.c(1042): proxy: HTTP: serving URL http://lucas.delexian.com:8009/
[Wed Feb 15 00:09:03 2006] [debug] proxy_http.c(178): proxy: HTTP connecting http://lucas.delexian.com:8009/ to lucas.delexian.com:8009
[Wed Feb 15 00:09:03 2006] [debug] proxy_util.c(1160): proxy: HTTP: fam 2 socket created to connect to lucas.delexian.com
[Wed Feb 15 00:09:03 2006] [debug] proxy_http.c(327): proxy: socket is connected
[Wed Feb 15 00:09:03 2006] [debug] proxy_http.c(361): proxy: connection complete to 192.168.0.100:8009 (lucas.delexian.com)
[Wed Feb 15 00:09:03 2006] [debug] proxy_http.c(939): proxy: header only
[Wed Feb 15 00:09:03 2006] [error] [client 192.168.0.1] File does not exist: /srv/www/htdocs/welcome
*****************
Apache Access Log
*****************
192.168.0.1 - - [15/Feb/2006:00:06:44 -0800] "GET /ocs/ HTTP/1.1" 304 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
192.168.0.1 - - [15/Feb/2006:00:06:45 -0800] "GET /welcome/index.jsp HTTP/1.1" 404 1050 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
192.168.0.1 - - [15/Feb/2006:00:07:29 -0800] "GET /ocs/ HTTP/1.1" 304 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
192.168.0.1 - - [15/Feb/2006:00:07:29 -0800] "GET /welcome/index.jsp HTTP/1.1" 404 1050 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
192.168.0.1 - - [15/Feb/2006:00:08:07 -0800] "GET /ocs/ HTTP/1.1" 304 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
192.168.0.1 - - [15/Feb/2006:00:08:07 -0800] "GET /welcome/index.jsp HTTP/1.1" 404 1050 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
192.168.0.1 - - [15/Feb/2006:00:08:32 -0800] "GET /ocs HTTP/1.1" 404 1050 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
192.168.0.1 - - [15/Feb/2006:00:09:03 -0800] "GET /ocs HTTP/1.1" 304 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
192.168.0.1 - - [15/Feb/2006:00:09:03 -0800] "GET /welcome/index.jsp HTTP/1.1" 404 1050 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"
*****************
httpd.conf.local
*****************
# Delexian Reverse proxy setup
LoadModule proxy_module /usr/lib/apache2-worker/mod_proxy.so
LoadModule proxy_http_module /usr/lib/apache2-worker/mod_proxy_http.so
#LoadModule proxy_ftp_module /usr/lib/apache2-worker/mod_proxy_ftp.so
#LoadModule proxy_connect_module /usr/lib/apache2-worker/mod_proxy_connect.so
LoadModule headers_module /usr/lib/apache2-worker/mod_headers.so
LoadModule deflate_module /usr/lib/apache2-worker/mod_deflate.so
LoadFile /usr/lib/libxml2.so.2
LoadModule proxy_html_module /usr/lib/apache2-worker/mod_proxy_html.so
ProxyRequests off
ProxyPass /ocs http://lucas.delexian.com:8009
ProxyPass /fin http://moya.delexian.com:8003
ProxyHTMLURLMap http://lucas.delexian.com:8009 /ocs
ProxyHTMLURLMap http://moya.delexian.com:8003 /fin
<Location /ocs/>
ProxyPassReverse /
SetOutputFilter proxy-html
ProxyHTMLURLMap / /ocs/
ProxyHTMLURLMap /ocs /ocs
RequestHeader unset Accept-Encoding
</Location>
<Location /fin/>
ProxyPassReverse /
SetOutputFilter proxy-html
ProxyHTMLURLMap / /fin/
ProxyHTMLURLMap /fin /fin
RequestHeader unset Accept-Encoding
</Location>
ProxyHTMLLogVerbose On
LogLevel Debug
---------------------------------------------------------------------
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
[users@httpd] Re: Apache 2 on Suse 9.1 Reverse Proxy not working
Posted by Joost de Heer <sa...@xs4all.nl>.
> 1. issue the following URL: http://lucas.delexian.com/ocs
> 2. Server responds with rewrite of URL:
> http://lucas.delexian.com/welcome/index.jsp
> 3. However, server message is:
> Object not found!
> The requested URL was not found on this server. If you entered the URL
> manually please check your spelling and try again.
The .jsp makes me think you want to proxy to a Tomcat machine. Then:
> ProxyPass /ocs http://lucas.delexian.com:8009
Here you need to use ProxyPass /ocs ajp://lucas.delexian.com:8009
Joost
---------------------------------------------------------------------
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
Re: [users@httpd] Apache 2 on Suse 9.1 Reverse Proxy not working
Posted by ht...@karsites.net.
Hi. I'm running SuSE 9.2 pro at home.
I have downloaded the source code for Apache 2.0.55 and
2.2.0. It is not difficult to compile on SuSE 9.2 - should
work OK on 9.1 as well.
Why don't you download the source and use that?
You should then be able to compile Apache 2.0.55, and use
the mod_proxy_html module compiled by Apache on your
SuSE 9.1 system.
HTH
Keith
In theory, theory and practice are the same;
In practice they are not.
On Tue, 14 Feb 2006 alex.lei@oracle.com wrote:
> To: users@httpd.apache.org
> From: alex.lei@oracle.com
> Subject: [users@httpd] Apache 2 on Suse 9.1 Reverse Proxy not working
>
> Hi all,
>
> I have tried to use the Apache Week article to set up
> reverse proxy. It is being installed on a SuSE 9 Linux x86
> box running Apache 2. I have configured it as per the
> notes, but am getting errors which I'm thinking is to do
> with the rewriting of the URL. Below is the error
> messages, as well as the configuration.
>
> The only thing which I've done different, is to use a copy
> of the mod_proxy_html.so from a mandrake rpm (for x586).
---------------------------------------------------------------------
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