I recently had a client that wanted to install Asterisk and FreePBX on a machine that was already running Apache so I though I’d have a go at getting it working with lighttpd instead.
It is pretty easy to setup and worked well. The instructions below are for CentOS 5.1.
Here’s how to set it up. You will probably need to alter this for your environment but it’ll be a good starting point.
You need to have already installed Asterisk and FreePBX. When installing FreePBX you should choose a unique location for the install rather than the Apache default – /var/www/html. I chose /var/www/freepbx.
I chose to install lighttpd from rpmforge but you could just as easy compile it from source.
See here for details on setting up rpmforge – http://dag.wieers.com/rpm/FAQ.php#B
Lighttpd configuration file changes
Change or add the following lines from the default lighttpd configuration file
Generate the SSL certificate
Create the password file
Set some access rights
And that’s it. You should now be able to connect to FreePBX on port 81 using HTTPS.
You should be asked for a username/password which, if you followed the instructions above, will be ‘bob’ and whatever password you chose.