[Fwd: Apache as a Rsync HTTP proxy]

Vincent Blondel vincent at xtra-net.org
Tue Dec 20 07:35:03 GMT 2005


Hello all,

I posted earlier this message to the Apache User's list but I haven't received any response, so I forward this message to
this list.

Maybe sombeody can help me to solve this problem.

Regards
Vincent.

---------------------------------------------------- Original Message -----------------------------------------------------
Subject: Apache as a Rsync HTTP proxy
From:    "Vincent Blondel" <vincent at xtra-net.org>
Date:    Mon, December 19, 2005 18:46
To:      users at httpd.apache.org
---------------------------------------------------------------------------------------------------------------------------

Hi all,

Recently I had to set-up our external http proxy (apache 1.3.x) in such a way that it accepts rsync traffic coming from our
lan.

So I decided to add a 'CONNECT' in my httpd.conf. This is all working now but not so fine as I could expect it. Sometimes
the communication is broken and I get this error message coming from rsync :

 ...
 rsync: connection unexpectedly closed ... [receiver]
 rsync error: error in rsync protocol data stream (code 12) at io.c(443) rsync: connection unexpectedly closed ... 
[generator]
 rsync error: error in rsync protocol data stream (code 12) at io.c(443) ...

I give you below my current config.

 -----

ServerType standalone
ServerName sbezoxaa
Listen sbezoxaa:8081
User www
Group www

ServerRoot "/var/www"

MinSpareServers 16
StartServers 16
MaxSpareServers 16
MaxClients 100
MaxRequestsPerChild 1000

LoadModule rewrite_module    /usr/lib/apache/modules/mod_rewrite.so LoadModule security_module  
/usr/local/lib/mod_security.so
LoadModule proxy_module      /usr/lib/apache/modules/libproxy.so
LoadModule mime_magic_module /usr/lib/apache/modules/mod_mime_magic.so

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
Timeout 300
IdentityCheck Off
HostnameLookups Off
UseCanonicalName On
ServerSignature Off

PidFile         run/httpd.pid
LockFile        run/accept.lock
ErrorLog        "|/usr/local/sbin/cronolog /var/www/logs/%Y/%m/%
d/error.log"
LogLevel        warn
LogFormat       "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"" combined
CustomLog   "|/usr/local/sbin/cronolog /var/www/logs/%Y/%m/%
d/access.log" combined

TypesConfig etc/apache/mime.types
DefaultType text/plain

<IfModule mod_mime_magic.c>
    MIMEMagicFile etc/apache/magic
</IfModule>

DocumentRoot   /tmp
RewriteLog     /dev/null
TransferLog    /dev/null
AccessConfig   /dev/null
ResourceConfig /dev/null

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

ProxyRequests On
ProxyVia On

# Note to add these connection authorization for Rsync
# 443           : https
# 873           : rsync
AllowCONNECT 443 873

<Directory proxy:*>
    Order deny,allow
    Allow from all
</Directory>

CacheRoot "/tmp"
CacheSize 1048576
CacheGcInterval 1
CacheMaxExpire 24
CacheLastModifiedFactor 0.1
CacheDefaultExpire 1

ProxyReceiveBufferSize 2048
ProxyIOBufferSize 131072

 -----

So if somebody gets any experience with this, I would appreciate some help to solve this problem.

Regards
Vincent



More information about the rsync mailing list