Monday, 16 November 2009

Rapache on Ubuntu 9.10

I've just now stumbled across Rapache, a useful GUI tool that makes configuring apache easy. I found it by accident in the Ubuntu Software Center, but unfortunately it would freeze while trying to add a new domain. I searched the web for answers, and found a bug report.

This didn't specifically reference Ubuntu 9.10 (rather, 9.04) and the file that needed to be patched didn't exist in the given location.

I found it easily enough:

paul@paul-laptop:~$ sudo find / -name RapacheGui.py[sudo] password for paul:
/usr/lib/pymodules/python2.5/RapacheGtk/RapacheGui.py
/usr/lib/pymodules/python2.6/RapacheGtk/RapacheGui.py
/usr/share/pyshared/RapacheGtk/RapacheGui.py
paul@paul-laptop:~$


I edited the last one (/usr/share/pyshared/RapacheGtk/RapacheGui.py) as documented in comment 23 to add the following at line 79:

if not Shell.command.ask_password(): sys.exit(1)


Note, this line MUST be preceeded by 8 spaces - indentation is important in Python.

Now, rapache would prompt for the system password and then close!

I've got it working now, by starting it with sudo:


sudo rapache


Everything seems to work. I've added a domain, turned on the include module, and added "AddOutputFilter INCLUDES .html" to the virtual host definition - all very quickly using rapache.

So, server side includes now work on my new virtual host - which is what I started out wanting to do before going off on this tangent.

0 comments:

Post a Comment