bloodhound-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jared>
Subject Re: Running Bloodhound via apache: 404
Date Wed, 18 Sep 2013 04:48:52 GMT
Allright, I was able to do it just as you described and everything seems to
be working perfectly.  It ran fine via tracd and apache, and in both modes
I tested modifying a wiki article and ticket.  While running via apache, I
was able to upload a file attachment to a ticket, view it, and delete it.
 Zero problems.  :)

Here is the list of commands I used, which might be helpful in updating the


mkdir /var/www/
cd !$
tar zxvf /usr/local/src/apache-bloodhound-0.7.tar.gz
mv apache-bloodhound-0.7/ src
cd src/installer/
virtualenv --system-site-packages ../../python-virtualenv
. !$/bin/activate
pip install -r requirements.txt
python --environments_directory=../../env -d sqlite
--project=<env name> --default-product-prefix=<prefix> --admin-user=<admin
tracd --port=8000 /var/www/<env name>
trac-admin ../../env/<env name>/ # modify components, versions, milestones
trac-admin /var/www/<env name>/ deploy /var/www/
# and now, to run via apache...
sudo useradd bloodhound
cd /var/www/
sudo chown -R bloodhound.www-data env www python-virtualenv
sudo chmod -R ug+r env www python-virtualenv
sudo chmod -R ug+w env
vi /etc/apache2/sites-available/
sudo a2ensite
sudo apache2ctl graceful


...and the contents of my /etc/apache2/sites-available/ file:


<VirtualHost *:80>

    LogLevel warn
    ErrorLog /var/log/apache2/
    CustomLog /var/log/apache2/ combined

    WSGIDaemonProcess bh_tracker user=bloodhound python-path=/var/www/
    WSGIScriptAlias / /var/www/
    <Directory /var/www/>
        WSGIProcessGroup bh_tracker
        WSGIApplicationGroup %{GLOBAL}
        Order deny,allow
        Allow from all
    <LocationMatch "/[^/]+/login">
        AuthType Digest
        AuthName "Bloodhound"
        AuthDigestDomain /
        AuthUserFile /var/www/<env
        Require valid-user



On Tue, Sep 17, 2013 at 2:36 PM, Ryan Ollos <> wrote:

> On Tue, Sep 17, 2013 at 2:31 PM, Jared Duncan <> wrote:
>> Thanks so much for that Ryan; very elucidating.
>> Yeah, I wasn't sure where that line was exactly between the source/setup
>> files and the files needed in the end once installation is complete, let
>> alone that there are actually a good 4 separable components here as you've
>> pointed out.  I did at first try moving the
>> bloodhound/installer/bloodhound/ and/or
>> bloodhound/installer/bloodhound/site/ dirs to a higher level elsewhere
>> and that resulted in something very much broken.  I probably needed to pass
>> the dir path as an argument to one of the install steps instead of moving
>> it after the fact.  It's unclear in the installation steps that in a few
>> cases, "bloodhound" refers to an actual directory name/path that is then
>> created, and not an argument/flag to differentiate it from vanilla trac,
>> for example.
>> Then, bloodhound-src can be deleted after install, and a newer version
>>> can be extracted to that location when upgrading. Static resources are
>>> deployed to www, and we can document the necessary permissions for each of
>>> these directories in a simple way. I'll have to try it out to be sure, but
>>> I think the webserver user will only need r-access to python-virtualenv and
>>> www, and will need w-access to bloodhound-env.
>> This!  That would be so much clearer and, imo, would be a better way to
>> instruct installation not only because of the permission and updateabilty
>> reasons you mentioned but also to significantly reduce the learning curve
>> and confusion for new users / improve adoption.  Although I'm not yet
>> familiar with what params to which commands drive to output to one
>> directory or another, I'm going to go ahead and try to arrive at exactly
>> this setup right now and I'll test it out and let you know.  :)
>> To be clear, the /srv/site-name/www directory would be the one created by
>> "trac-admin deploy", i.e. the command would then be:
>> trac-admin /srv/site-name/bloodhound-env/main/ deploy /srv/site-name/www
>> , correct?
> Yeah, that is correct. Thanks for experimenting and reporting your
> feedback. I'll do some experimenting in parallel and it would be great if
> we can improve the docs as a result over the next few days.

View raw message