httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Theroux <mther...@sonicsoftware.com>
Subject [users@httpd] Keepalive utilizing HTTP 1.0 via mod_proxy
Date Wed, 29 Jan 2003 23:48:05 GMT
Hello,

	I am attempting to write a HTTP 1.0 application that utilizes Apache 1.3.27
as a reverse proxy to an in-house HTTP server.  The connections will be
utilizing https.

	On the server, I've noticed that "Connection: close" is always set within
every proxied HTTP header.  In the original HTTP request, Connection:
keep-alive is specified.  This is causing a lot of additional connection
overhead.

	Similar behavior seems to occur with 1.1 clients.

	Browsing through the 1.3 source, I've noticed the following in
proxy_http.c:

int ap_proxy_http_handler(request_rec *r, cache_req *c, char *url,
                              const char *proxyhost, int proxyport)
{

	.
	.
	.
    /* we don't yet support keepalives - but we will soon, I promise! */
    ap_table_set(req_hdrs, "Connection", "close");
	.
	.
	.
}

Should I take this to mean that mod_proxy under Apache 1.3.27 does not
support persistent connections?

	I moved onto Apache 2.0.44.  Again utilizing a 1.0 client.  I appear to be
hitting another set of problems.

	"Connection: close" is no longer inserted into every proxied request.
However, the proxied reply does have "connection: close" set.  Once the
reply is received, Apache closes the socket to the 1.0 client.

	1.1 Clients utilizing Apache 2.0.44 as a reverse proxy seems to function
correctly.

	So, in summary, I have two questions:

1) Does Apache 1.3.24 mod_proxy reverse proxy support persistent
connections?  If so, what may I be doing incorrectly? (Keep-Alive is on,
httpd.conf is at the end of this message)

2) What is required to allow a HTTP 1.0 client to establish a persistent
connection utilizing Apache 2.0.44 as the reverse proxy?


http.conf for 1.3.24 below:

ServerType standalone
ServerRoot "D:/apache-met"
PidFile logs/httpd.pid
ScoreBoardFile logs/apache_runtime_status

Timeout 300
KeepAlive on
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MaxRequestsPerChild 0
ThreadsPerChild 50

LoadModule proxy_module modules/mod_proxy.so
LoadModule ssl_module modules/mod_ssl.so

ClearModuleList
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_isapi.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_proxy.c
AddModule mod_ssl.c
AddModule mod_so.c
AddModule mod_setenvif.c

listen 80
listen 443

ServerName foo.bar.com

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

UseCanonicalName On

<IfModule mod_mime.c>
    TypesConfig conf/mime.types
</IfModule>

DefaultType text/plain

<IfModule mod_mime_magic.c>
    MIMEMagicFile conf/magic
</IfModule>

HostnameLookups Off

ErrorLog logs/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
ServerSignature On

<IfModule mod_proxy.c>
   ProxyRequests On
</IfModule>

	SSLMutex sem
	SSLRandomSeed startup builtin
	SSLSessionCache none
	SSLLog logs/SSL.log
	SSLLogLevel info
	SSLProtocol all
	SSLLog logs/ssl_engine_log
	SSLPassPhraseDialog builtin

<VirtualHost foo.bar.com:80>
	SSLEngine off
	SSLVerifyClient none
	SSLCACertificatePath ssl/
	SSLCertificateFile ssl/test_Server_0.der
	SSLCertificateKeyFile ssl/clientkey.pem
	ProxyPass  	  /SC/	 http://nbmtheroux2:47011/SC/
	ProxyPassReverse  /SC/	 http://nbmtheroux2:47011/SC/
	NoCache *
</VirtualHost>

<VirtualHost foo.bar.com:443>
	SSLEngine on
	SSLVerifyClient none
	SSLCACertificatePath ssl/
	SSLCertificateFile ssl/test_Server_0.der
	SSLCertificateKeyFile ssl/clientkey.pem
	ProxyPass  	  /SC/	 https://nbmtheroux2:47012/SC/
	ProxyPassReverse  /SC/	 https://nbmtheroux2:47012/SC/
	NoCache *
</VirtualHost>



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


Mime
View raw message