Bzr and Apache

I had some problems hosting bzr on 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
bzr: ERROR: HTTP Error 406: Not Acceptable
  command: '/home/magnus/bin/bzr' 'branch' ''
      pwd: u'/home/magnus/prog/tmp'
    error: urllib2.HTTPError
  at /usr/lib/python2.4/ 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

The made my bzr mirrors work just fine.

⟸ Experiencing Arch Linux PCSpecialist delivered perfectly! ⟹
Leave a comment