httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Karakashian <>
Subject [users@httpd] Reverse proxy not working
Date Wed, 23 Feb 2005 03:18:19 GMT
I've driven myself crazy for the last few days, and searches have
gotten me nowhere.  Help, please. :)

My home environment: (this is representative of the
external IP of the router)

The internal machine is the primary webserver running Apache 2.0.52. 
External is the firewall/router running Linux and port-forwarding port
443 back to the internal webserver.  owa is my Exchange 2003 server. 
wireless is my WAP.  The goal is to have internal dole out pages
excepting /exchange which will be proxied from the Exchange server. 
Pages from /wireless should be proxied from the WAP's control pages.

I'm including my entire conf, as I've found a couple of solutions here
and there and they usually only have the "relevant" parts, but I'm
going to include the whole thing in case I'm missing anything (like a
module).  I've removed pretty much but a most basic configuration,
I'll add the other stuff back in later.

Now, I've done this in the past, when I had Apache running on the
firewall acting as a reverse proxy for everything inside.  However, a
similar config is just refusing to work for me right now (the old
proxy was also 2.0.52).  For the relevant parts:

RewriteEngine On
RewriteLogLevel 30
RewriteLog logs/rewrite.log
RewriteRule ^/exchange/(.*)$1 [P]
RewriteRule ^/public/(.*)$1 [P]
RewriteRule ^/exchweb/(.*)$1 [P]
RewriteRule ^/wireless/(.*)$1 [P]

The last line is duplicated from my original config, and worked in the
past.  However, now, when I attempt to access one of the proxied
pages, I get the internal IP of the server, rather than the proper
URL.  So, for example, I can't access /wireless from the outside since
it's not a valid address.

The rewrite log seems to indicate the proxy is working as it should:

init rewrite engine with requested uri /exchange/
applying pattern '^/exchange/(.*)' to uri '/exchange/'
rewrite /exchange/ ->
forcing proxy-throughput with
go-ahead with proxy request proxy: [OK]

But, it's not proxying, it's just rewriting the URL and returning it
to the client.

Any suggestions?

Thanks in advance,


ServerRoot "/usr"
PidFile /var/run/
Timeout 300
KeepAlive On
Listen 443
User apache
Group apache

UseCanonicalName Off
DocumentRoot "apache/htdocs/"
ServerTokens Prod
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLSessionCache none
SSLVerifyClient none
CheckSpelling On

LoadModule access_module lib/apache/ 
LoadModule include_module lib/apache/ 
LoadModule log_config_module lib/apache/ 
LoadModule mime_magic_module lib/apache/ 
LoadModule unique_id_module lib/apache/ 
LoadModule proxy_module lib/apache/ 
LoadModule proxy_connect_module lib/apache/ 
LoadModule proxy_ftp_module lib/apache/ 
LoadModule proxy_http_module lib/apache/ 
LoadModule ssl_module lib/apache/ 
LoadModule mime_module lib/apache/ 
LoadModule negotiation_module lib/apache/ 
LoadModule dir_module lib/apache/ 
LoadModule speling_module lib/apache/ 
LoadModule userdir_module lib/apache/ 
LoadModule alias_module lib/apache/ 
LoadModule php5_module lib/apache/
LoadModule headers_module lib/apache/
LoadModule rewrite_module lib/apache/

DirectoryIndex index.html index.php

AccessFileName .htaccess

TypesConfig conf/mime.types
DefaultType text/plain
MIMEMagicFile conf/magic
HostnameLookups Off
EnableMMAP off
EnableSendfile On

ErrorLog /error_log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"\"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common 
LogFormat "%{Referer}i -> %U" referer 
LogFormat "%{User-agent}i" agent
CustomLog logs/access_log common 

AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php

SSLEngine on
# I'm using the same name internally and externally on my laptop.  I'm
using some DNS
# fiddling to point to the right machine


SSLCertificateFile newcert.pem
SSLCertificateKeyFile nopass.key
SSLCACertificateFile cacert.pem
SSLCARevocationPath crl

RewriteEngine On
RewriteLogLevel 30
RewriteLog /home/apache/logs/rewrite.log
RewriteRule ^/exchange/(.*)$1 [P]
RewriteRule ^/public/(.*)$1 [P]
RewriteRule ^/exchweb/(.*) http://192.168.01/exchweb/$1 [P]
RewriteRule ^/wireless/(.*)$1 [P]
ProxyRequests Off

<Proxy *>
  Order deny,allow
  Allow from all

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