Published on

MythWeb with lighttpd for Fedora

Authors

Add a lighttpd configuration file in /etc/lighttpd/conf.d/lighttpd-myth.conf (where my machine hostname is 'americas' on the local network) :

#! /bin/bash # Just for SciTE language hint

$HTTP["host"] == "myth.americas" {
       var.root="/var/www/html/mythweb"
       server.document-root = var.root

       url.rewrite = (
               "^(/tv.*|/music.*|/video.*|/weather.*|/settings.*|/status.*|/backend_log.*
)$" =>   "/mythweb.php/$1",
               "^/$"=>"/mythweb.php"
       )

       fastcgi.server         = ( ".php" => (
               "myth.americas" => (
                       "socket" => "/tmp/php-fastcgi.socket",
                       "bin-path" => "/usr/bin/php-cgi",
                       "broken-scriptfilename" => "enable",
                       "bin-environment" => (
                               "db_server" => "localhost",
                               "db_name" => "mythconverg",
                               "db_login" => "mythtv",
                               "db_password" => "mythtv"
                       )
               )
       ))
}

Fix up the permissions lighttpd user (so that the default expectation of being apache are met (if MythWeb claims "Cannot write to data directory" ) :

# NOT THE BEST WAY : chown apache:lighttpd /var/www/html/mythweb/data/
# MUCH BETTER
/usr/sbin/usermod -G -a apache lighttpd

And start the lighttpd with :

/etc/init.d/lighttpd restart

or webmin.