Published on

phpMyAdmin, lighttpd and Fedora 9

Authors
yum install mysql-server   lighttpd   php php-mysql   phpMyAdmin

This puts the phpMyAdmin install in /usr/share/phpMyAdmin.

Add a new configuration file called /etc/lighttpd/lighttpd-phpMyAdmin.conf :

# server.bind = "phpmyadmin.example.com" # If there isn't a server.bind already

# Ensure the modules we need are loaded in
server.modules += ( "mod_cgi" )
# server.modules += ( "mod_alias", "mod_cgi" )

$HTTP["host"] == "phpmyadmin.example.com" {
var.root    = "/usr/share/phpMyAdmin"
server.document-root = var.root + "/"

# This is regular (slow) straight CGI
$HTTP["url"] =~ "^/" {
#  alias.url += ( "/" => server.document-root )
 cgi.assign = ( ".php" => "/usr/bin/php-cgi" )
}
}

and include it into the standard /etc/lighttpd/lighttpd.conf by appended :

include "lighttpd-phpMyAdmin.conf"

Finally, since the phpMyAdmin install expects Apache to be used as the web server, all of the session folders are permissioned for Apache. If one 'chown's them, then 'yum update's will potentially break things in the future. A more sensible solution is to add lighttpd to the apache group :

/usr/sbin/usermod -a -G apache lighttpd

Now, /etc/init.d/lighttpd restart, and then the phpMyAdmin webpage (with two frames) should be at : http://phpmyadmin.example.com/.

Obviously, update 'example.com' for your own hostname.