Bzr and Apache
- Magnus Therning
I had some problems hosting bzr
on therning.org
. I gave up on getting the development version to push via FTP and settled for missoring using lftp
instead. However, branching from the published mirror failed. I got the following from bar
(version 0.6.2):
% bzr branch http://therning.org/magnus_bzr/epilicious
bzr: ERROR: HTTP Error 406: Not Acceptable
command: '/home/magnus/bin/bzr' 'branch' 'http://therning.org/magnus_bzr/epilicious'
pwd: u'/home/magnus/prog/tmp'
error: urllib2.HTTPError
at /usr/lib/python2.4/urllib2.py line 480, in http_error_default()
see ~/.bzr.log for debug information
The file wouldn’t even be handed out to a web browser. I managed to track down the problem, a percent sign ‘%’, in the file name. It turned out the Apache server is using mod_security
. A .htaccess
file with the following contents in the a directory turns it off for the directory and all sub-directories:
<ifmodule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</ifmodule>
The made my bzr
mirrors work just fine.