BlueOnyx Hacks

BlueOnyx is a nice software appliance you can use to easily configure hosting for multiple websites. It's open source and free (as in 'free speech' as well as in 'free beer'.) You can get it as an .iso image Linux distribution - just burn it on a disk and install it. Configuration is pretty easy, but you may run into a few glitches... Here's how I solved two of them:

BlueOnyx htaccess .htaccess

For security reasons .htaccess files aren't allowed in the webspace of sites or users. You need to keep in mind that .htaccess files can be used to change the behaviour and settings of Apache and Apache modules like PHP.

Enabling htaccess:

In /etc/httpd/conf.d/blueonyx.conf there is this section:
<Directory /home/.sites/>
Options Indexes FollowSymLinks Includes MultiViews
AllowOverride AuthConfig Indexes Limit

In order to allow .htaccess files in webspace, you just need to change it to this:
<Directory /home/.sites/>
Options Indexes FollowSymLinks Includes MultiViews
AllowOverride AuthConfig Indexes Limit All

As you can see, the word All was added to the line starting with AllowOverride.

Afterwards Apache needs to be restarted:
/etc/init.d/httpd restart

Change the URL of the  BlueOnyx login

Sometimes you want to install applications that require administrators or users to go to http://www.domain.com/admin or http://www.domain.com/login for administrative or login purposes, but these URL's are already in use by BlueOnyx for its own administrative interface login.

In /etc/httpd/conf.d/blueonyx.conf there is this section:
RewriteCond %{HTTP_HOST}        ^([^:]+)
RewriteRule ^/admin/?$          http://%1:444/login.php [L,R]
RewriteCond %{HTTP_HOST}        ^([^:]+)
RewriteRule ^/siteadmin/?$      http://%1:444/login.php [L,R]
RewriteCond %{HTTP_HOST}        ^([^:]+)
RewriteRule ^/personal/?$       http://%1:444/login.php [L,R]
RewriteCond %{HTTP_HOST}        ^([^:]+)
RewriteRule ^/login/?$          http://%1:444/login.php [L,R]

Let's say you decide to use only http://www.domain.com/boxadmin/ for administering BlueOnyx. Change the section to this (delete the lines that are not needed):
RewriteCond %{HTTP_HOST}        ^([^:]+)
RewriteRule ^/boxadmin/?$       http://%1:444/login.php [L,R]