Ticket #9251: ew-mythweb-lighty-20110118a.patch
| File ew-mythweb-lighty-20110118a.patch, 5.6 KB (added by , 16 years ago) |
|---|
-
INSTALL
diff --git a/INSTALL b/INSTALL index a2384f5..f7060c6 100644
a b webserver, and then follow the instructions in the appropriate subsection: 199 199 mythweb.conf.apache (See section 5.0) 200 200 mythweb.conf.lighttpd (See section 6.0) 201 201 202 Please do not use Lighttpd unless you know what you are doing.203 204 202 ========== 205 203 5.0 Apache 206 204 ========== … … or type "ifup eth0" if you used "ifdown eth0" to disable the network earlier. 366 364 6.0 Lighttpd 367 365 ============ 368 366 369 Sorry, no documentation here yet... 367 Configuring lighttpd for mythweb is straightforward and easy. 368 369 1. Copy the lighttpd config template file from your mythweb 370 sources to your lighttpd configuration directory: 371 372 # cp -vi ./mythweb.conf.lighttpd /etc/lighttpd/mythweb.conf.lighttpd 373 374 Be sure to edit it for any particulars of your setup. 375 376 2. Edit your main lighttpd.conf file and add an include (with any 377 path adjustments, depending on where you stored it): 378 379 include "/etc/lighttpd/mythweb.conf.lighttpd" 380 381 3. For HTTP Digest authentication, create the credentials file (see 382 the htdigest documentation for more detail): 383 384 # htdigest -c /etc/lighttpd/mythweb.htdigest 'Authorized MythWebbers' tom 385 386 4. Set up a hostname that begins with "mythweb", pointing to an IP on 387 which your lighttpd server is listening. 388 389 4a. For DNS: If you run your own DNS, add an "A" record for 390 mythweb.whatever. 391 392 4b. For /etc/hosts: On all of your client browser machines, add 393 something like the following to /etc/hosts: 394 395 192.186.0.3 mythweb.local mythweb 396 397 Be sure to substitute the IP address at which lighttpd is reachable, 398 of course. Also, take note that some systems are particular about the 399 whitespace between the IP address and the hostname in /etc/hosts -- 400 sometimes it must consist of tab (^H) characters. 401 402 Then... Restart lighttpd and go! 403 404 Assuming you set it up this way, simply direct your browser to 405 http://mythweb.local/ and enjoy. 370 406 371 407 ======= 372 408 7.0 PHP -
mythweb.conf.lighttpd
diff --git a/mythweb.conf.lighttpd b/mythweb.conf.lighttpd index c1f9f5f..a575e11 100644
a b 1 1 # This is a user supplied example file. Please modify before use 2 2 3 3 # Apply mythweb configuration if hostname starts with mythtv 4 $HTTP["host"] =~ "^mythtv" { 5 # Requiring authentication is a good idea if the server is publicly 6 # accessible. On a private server this section can be safely removed. 7 auth.backend = "htdigest" 8 auth.backend.htdigest.userfile = "/path/to/htdigest" 9 auth.require = ( 10 "/" => ( 11 "method" => "digest", 12 "realm" => "MythTV", 13 "require" => "valid-user" 14 ) 15 ) 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" 16 10 17 # Use fastcgi for the PHP parts 18 fastcgi.server = ( 19 ".php" => (( 20 "bin-path" => "/usr/bin/php-cgi", 21 "socket" => "/var/run/lighttpd/mythtv-php-fcgi.socket", 22 "broken-scriptfilename" => "enable", 23 "bin-environment" => ( 24 "db_server" => "agrajag", 25 "db_name" => "mythconverg", 26 "db_login" => "mythtv", 27 "db_password" => "mythtv" 28 ) 29 )) 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" 30 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. 31 28 32 # Environment variables for the Perl parts 33 setenv.add-environment = ( 34 "db_server" => "servername", 29 fastcgi.server = ( 30 ".php" => (( 31 "bin-path" => "/usr/bin/php-cgi", 32 "socket" => "/var/run/lighttpd/mythtv-php-fcgi.socket", 33 "broken-scriptfilename" => "enable", 34 "bin-environment" => ( 35 "db_server" => "localhost", 35 36 "db_name" => "mythconverg", 36 37 "db_login" => "mythtv", 37 "db_password" => "password" 38 ) 38 "db_password" => "mythtv" 39 ) 40 )) 41 ) 39 42 40 cgi.assign = (41 ".pl" => "/usr/bin/perl"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. 43 46 44 url.rewrite-once = ( 45 "^/(css|data|images|js|themes|skins|[a-z_]+\.(php|pl)).*" => "$0", 46 "^/(pl(/.*)?)$" => "/mythweb.pl/$1", 47 "^/(.+)$" => "/mythweb.php/$1", 48 "^/(.*)$" => "/mythweb.php" 49 ) 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 ) 50 70 }
