You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Steve Brereton <th...@hotmail.com> on 2011/06/09 16:47:24 UTC

[users@httpd] problems with reverse proxy!

Hi there.

We're having problems with a reverse proxy that runs from a windows 2003 /iis server to a w2k8/iis (dmz to internal server).
Its running on Apache 2.2.3 using the following module setup

########################
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule file_cache_module modules/mod_file_cache.so
LoadModule headers_module modules/mod_headers.so
LoadModule imagemap_module modules/mod_imagemap.so
LoadModule include_module modules/mod_include.so
#LoadModule info_module modules/mod_info.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule status_module modules/mod_status.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so
LoadFile "C:/Program Files/Apache Software Foundation/Apache2.2/bin/zlib1.dll"
LoadFile "C:/Program Files/Apache Software Foundation/Apache2.2/bin/iconv.dll"

LoadFile "C:/Program Files/Apache Software Foundation/Apache2.2/bin/libxml2.dll"

RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
######################
The reverse proxy runs under a virtual host:

#################

<VirtualHost *:80>

    ServerName xxxxx.xxxx.xxxx.xxxxxx
    ServerAlias http://xxx.xxxxxx.xxxxx.xxxxx
    ErrorLog logs/httpd-localview-error2.log
    CustomLog logs/httpd-localview-access2.log common

    ProxyRequests off
    RewriteEngine On
    AddDefaultCharset UTF-8

    ProxyPass / http://xxx.xxx.xxx.xxx/yyyyy/
    ProxyPassReverse / http://x.xxx.xxx.xx/yyyyyy/

    ProxyHTMLLogVerbose On
    LogLevel crit
    ProxyHTMLEnable On
    ProxyHTMLExtended On
    BrowserMatch MSIE force-response-1.0
    ProxyHTMLMeta On
    ProxyHTMLStripComments Off
    ProxyHTMLDoctype XHTML

    ProxyHTMLURLMap http://xxxx.xxxx.xxxx.xxxx/ /
    ProxyHTMLURLMap http://xxxxxx.xxxxx.xxxx.xxxx/yyyyyy/ / 
    ProxyHTMLURLMap /yyyyyyyy/ /
    ProxyBadHeader Ignore

    RequestHeader unset Accept-Encoding

</VirtualHost>
#######################

The basic error is a 502 bad gateway one, that always goes away after several refereshes on the browser.

I've been through the logs and setup with a fine toothcomb, have added in a few bits missed - the dll loads mainly, and the BadHeader ignore.

However, beyond a slight mprovement in the performance, nothing is better than it was before!

Making slight changes to the iis server on the end seems to make the site load fine for a short time.

the error log is not being filled at present, so I'm unsure where the 502 errors are being recorded
 		 	   		  

RE: [users@httpd] problems with reverse proxy!

Posted by Steve Brereton <th...@hotmail.com>.
that seems to have worked
thanks

> Date: Thu, 9 Jun 2011 17:03:48 +0100
> From: tevans.uk@googlemail.com
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] problems with reverse proxy!
> 
> On Thu, Jun 9, 2011 at 3:47 PM, Steve Brereton <th...@hotmail.com> wrote:
> > Hi there.
> >
> > We're having problems with a reverse proxy that runs from a windows 2003
> > /iis server to a w2k8/iis (dmz to internal server).
> > Its running on Apache 2.2.3 using the following module setup
> 
> Try adding this:
> 
> SetEnv proxy-nokeepalive 1
> 
> This is a hunch, some sites perform badly if keepalive is used on the
> proxy connections.
> 
> Cheers
> 
> Tom
> 
> ---------------------------------------------------------------------
> 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] problems with reverse proxy!

Posted by Steve Brereton <th...@hotmail.com>.
Thanks for the suggestion.
I've updated and restarted. Usually needs a few hours to be confirmed....

> Date: Thu, 9 Jun 2011 17:03:48 +0100
> From: tevans.uk@googlemail.com
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] problems with reverse proxy!
> 
> On Thu, Jun 9, 2011 at 3:47 PM, Steve Brereton <th...@hotmail.com> wrote:
> > Hi there.
> >
> > We're having problems with a reverse proxy that runs from a windows 2003
> > /iis server to a w2k8/iis (dmz to internal server).
> > Its running on Apache 2.2.3 using the following module setup
> 
> Try adding this:
> 
> SetEnv proxy-nokeepalive 1
> 
> This is a hunch, some sites perform badly if keepalive is used on the
> proxy connections.
> 
> Cheers
> 
> Tom
> 
> ---------------------------------------------------------------------
> 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] problems with reverse proxy!

Posted by Tom Evans <te...@googlemail.com>.
On Thu, Jun 9, 2011 at 3:47 PM, Steve Brereton <th...@hotmail.com> wrote:
> Hi there.
>
> We're having problems with a reverse proxy that runs from a windows 2003
> /iis server to a w2k8/iis (dmz to internal server).
> Its running on Apache 2.2.3 using the following module setup

Try adding this:

SetEnv proxy-nokeepalive 1

This is a hunch, some sites perform badly if keepalive is used on the
proxy connections.

Cheers

Tom

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