hellahella on Apache 2

         · ·

I have been using hellahella using paster serve and I must say the performance was terrible. I don’t think that it is mean’t to be run for any length of time which is at odds with hellahella, the web interface to hellanzb, which is.

I have documented before that I am using hellanzb to manage my nzb files, and hellahella makes it even easier and with integration with http://www.newzbin.com it is even better (how about one click downloads, unrar, par, and ready to view – yes I have it!)

So I wanted to run hellahella using Apache2 on my Debian box. Luckly just as I wanted to do this a new FAQ was put up on the Pylons web site on how to achieve this using mod_python (which I also wanted to use). Pylons is a web framework for python and it seems quite good too and I got alot of help from the very helpful pylons-discuss group on groups.google.com.

So I setup Apache2 or rather Debian did using apt-get, and I got a fairly normal install. If you haven’t used version2 of apache before the configuration has changed somewhat and all the config files are now split. At the same time I also installed mod_python using apt-get and as this is rather well documented I am not going to write it down here. Now all we need do is follow the first part of the instructions on the Pylons site:

  1. Install hellahella (I assume you are running hellanzb already otherwise go and download and install it) and make sure it works with paster serve hella.ini
  2. Make sure mod_python is installed and enabled.
  3. Save the http://projects.amor.org/misc/svn/modpython_gateway.py script as wsgi.py in your mod_python python directory which is /usr/lib/python2.3/site-packages/mod_python/ on my system.
  4. Create a project directory. I used /www/hellahella
  5. Create startup.py file in this directory with the following information:from paste.deploy import loadapp

    app = loadapp(“config:/www/hellahella/hella.ini”)

  6. Create a link to your hella.ini file: ln -s /etc/hella.ini hella.ini

  7. Go into your apache2 sites directory: cd /etc/apache2/sites-available/

  8. Create a new site: vi hellahellaSite

  9. And input the following information:

    VirtualHost 127.0.0.1
    ServerAdmin tim@timc3.com
    DocumentRoot /www/hellahella/
    SetHandler mod_python
    PythonHandler mod_python.wsgi
    PythonPath “[‘/www/hellahella/’] + sys.path”
    PythonOption wsgi.application startup::app
    PythonOption SCRIPT_NAME /
    ErrorLog /var/log/apache2/error.log
    Alias /stylesheets/ “/www/hellahellaMedia/stylesheets/”
    Alias /javascripts/ “/www/hellahellaMedia/javascripts/”
    Alias /images/ “/www/hellahellaMedia/images/”
    LogLevel warn
    CustomLog /var/log/apache2/access.log combined
    /VirtualHost

  10. Remember to change the ipaddress 127.0.0.1 to whatever ipaddress or domain name you need.

  11. The to a level above your doc root: cd /www

  12. Then create a link from the public media files for hellahella to a directory here: ln -s /usr/lib/python2.3/site-packages/hellahella-0.1dev_r782-py2.3.egg/hellahella/public

  13. Rename public: mv public hellahellaMedia

  14. You might need to chgrp and chown the files under this directory.

  15. Then enable this site: a2ensite hellahellaSite

  16. Restart apache2: /etc/init.d/apache2 stop; /etc/init.d/apache2 start

  17. Then test.

  18. And it should work aslong as hellanzb.py is running and hellahella is setup correctly.

And I must say it is looking good!

comments powered by Disqus