1# This is a user supplied example file. Please modify before use 2 3# Apply mythweb configuration if hostname starts with mythtv 4$HTTP["host"] =~ "^mythweb" { 5 6 # You'll want to specify the document root, naturally. Clone the 7 # git repo there for the easiest and best results. 8 9 server.document-root = "/var/www/localhost/htdocs/mythweb" 10 11 # Configure this section for HTTP Digest Authentication. Be sure to 12 # set up the mythweb.htdigest file for your users according to the 13 # lighttpd documentation. 14 15 auth.backend = "htdigest" 16 auth.backend.htdigest.userfile = "/etc/lighttpd/mythweb.htdigest" 17 auth.require = ( 18 "/" => ( 19 "method" => "digest", 20 "realm" => "MythTV", 21 "require" => "valid-user" 22 ) 23 ) 24 25 # Whether or not you're using fastcgi for PHP applications in 26 # general on your lighttpd server, this makes sure you are for 27 # mythweb. 28 29 fastcgi.server = ( 30 ".php" => (( 31 "bin-path" => "/usr/local/bin/php-cgi", 32 "socket" => "/var/run/lighttpd/mythtv-php-fcgi.socket", 33 "broken-scriptfilename" => "enable", 34 "bin-environment" => ( 35 "db_server" => "localhost", 36 "db_name" => "mythconverg", 37 "db_login" => "mythtv", 38 "db_password" => "mythtv" 39 ) 40 )) 41 ) 42 43 # Credentials to pass along to the CGI scripts. Be sure to 44 # configure the correct hostname, username, database name, and 45 # password for your MySQL server's MythTV setup. 46 47 setenv.add-environment = ( 48 "db_server" => "localhost", 49 "db_name" => "mythconverg", 50 "db_login" => "mythtv", 51 "db_password" => "mythtv" 52 ) 53 54 # This makes sure that mythweb's perl files get run by the perl 55 # interpreter. 56 57 cgi.assign = ( 58 ".pl" => "/usr/bin/perl" 59 ) 60 61 # The mythweb code relies on some URL rewriting. This directive is 62 # required. 63 64 url.rewrite-once = ( 65 "^/(css|data|images|js|themes|skins|[a-z_]+\.(php|pl)).*" => "$0", 66 "^/(pl(/.*)?)$" => "/mythweb.pl/$1", 67 "^/(.+)$" => "/mythweb.php/$1", 68 "^/(.*)$" => "/mythweb.php" 69 ) 70} 71