httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Gale <>
Subject [users@httpd] Reverse Proxy and mod_rewrite
Date Fri, 16 Jan 2004 05:43:38 GMT

	I have a small insecure http listener on and I want to
be able to access it via

I am running Apache 2.0.47 but will be upgrading soon to the latest
2.0.X. I also have the latest mod_perl and PHP 4.something.

I have added the following to my httpd.conf file but am having issues.

RewriteEngine On
RewriteCond %{HTTP_REFERER} ^http:\/\/www\.mydomain\.com/monitoring/.* 
RewriteCond %{REQUEST_URI} !^/monitoring/.* 
RewriteRule ^/(.*)$1 [L,P]

###  ProxyPassReverse

ProxyRequests On
<Location /monitoring/>
        SetEnv force-proxy-request-1.0 1       
        SetEnv proxy-nokeepalive 1      

I am access the initial page of the server fine on and
all subsquent pages that use relative paths but some of the links use
absolute paths. I think this is referred to non-canonical urls.

Anyways ... so I need to have the requested URL rewritten to include the
full path, if is a users request /infopage and the HTTP_REFERER is* then add to the front of it.

I tried placing the logs in debug but it says nothing about rewrite
that I can see.

[Thu Jan 15 22:40:02 2004] [debug] proxy_http.c(109): proxy: HTTP:
canonicalising URL //
[Thu Jan 15 22:40:02 2004][debug] mod_proxy.c(459): Trying to run
[Thu Jan 1522:40:02 2004] [debug] proxy_http.c(1076): proxy: HTTP:
serving URL
[Thu Jan 15 22:40:02 2004] [debug] proxy_http.c(221): proxy: HTTP
connecting to
[Thu Jan 15 22:40:02 2004] [debug] proxy_util.c(1203): proxy: HTTP: fam
2 socket created to connect to
[Thu Jan 15 22:40:02 2004] [debug] proxy_http.c(370): proxy: socket is
[Thu Jan 15 22:40:02 2004][debug] proxy_http.c(404): proxy: connection
complete to
[Thu Jan 15 22:40:02 2004] [debug] proxy_http.c(917): proxy: start body
[Thu Jan 15 22:40:02 2004] [debug] proxy_http.c(976): proxy: end body

Hand over the Slackware CD's and back AWAY from the computer, your geek
rights have been revoked !!!

Michael Gale
Slackware user :) 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message