You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by t-systems-fitz <t-...@web.de> on 2003/08/20 15:07:34 UTC

[users@httpd] Re: Problems with mod_proxy and apache2

Hello,

I checked the source of the proxy module an found out that in the function
"static const char *ap_proxy_location_reverse_map" in the file

modules/proxy/proxy_http.c, the http-header Location should be rewritten.

But there is a condition:

"if (l1 >= l2 && strncmp(ent[i].real, url, l2) == 0)", which is at no time
true in my scenarion (because of strncmp!=0).  So I changed the condition to
"if(l1 >= l2)" and now it works.

But I wonder, that in 1.3.27 this function is identical but it works with
the strncmp-Condition.

Maybe someone can help me and explain it to me.

best regards fitz

----- Original Message -----
From: "t-systems-fitz" <t-...@web.de>
To: <us...@httpd.apache.org>
Sent: Wednesday, August 20, 2003 1:00 PM
Subject: Problems with mod_proxy and apache2


> Hello,
>
> I recently upgraded from apache 1.3.27 to apache 2.0.47. But now my
reverse
> proxy does not work correctly. It seems that mod_proxy did not rewrite
> Redirects. The Header Location is not rewrited. I use the same
configuration
> for the virtual host as in 1.3.27 and under that version the Location
field
> was rewritten.
>
>  <VirtualHost 192.168.1.4:443>
>
>     DocumentRoot "/usr/local/apache2/htdocs"
>     ErrorLog /usr/local/apache2/logs/error_log
>     TransferLog /usr/local/apache2/logs/transfer_log
>     SSLEngine on
>     SSLProxyEngine on
>     SSLCipherSuite
> ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
>     SSLCertificateFile /usr/local/apache2/conf/ssl.crt/xxx.crt
>     SSLCertificateKeyFile /usr/local/apache2/conf/ssl.key/xxx.key
>     ServerName realname.xxx.com
>     ServerAdmin postmaster@XXXXXX
>     ProxyPass / http://XXXXXX:8000/
>     ProxyPassReverse / http://XXXXXXX:8000/
>
>   </VirtualHost>
>
> If the webserver sends Location: http://XXXXXX:8000/bla then under 1.3.27
> the proxy sends to the client Location: https://realname.xxx.com/bla, but
> under apache 2 the Location header is not rewritten.
>
> I compiled apache2 withh following config:
>
>
>
>
./configure --enable-proxy --enable-ext-filter --enable-headers --enable-ssl
>  --prefix=/usr/local/apache2
>
> best regards fitz
>
>


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