Ticket #9251: ew-mythweb-lighty-20110118a.patch

File ew-mythweb-lighty-20110118a.patch, 5.6 KB (added by E. Westbrook <mythtv-trac@…>, 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:  
    199199    mythweb.conf.apache         (See section 5.0)
    200200    mythweb.conf.lighttpd       (See section 6.0)
    201201
    202 Please do not use Lighttpd unless you know what you are doing.
    203 
    204202==========
    2052035.0 Apache
    206204==========
    or type "ifup eth0" if you used "ifdown eth0" to disable the network earlier.  
    3663646.0 Lighttpd
    367365============
    368366
    369 Sorry, no documentation here yet...
     367Configuring lighttpd for mythweb is straightforward and easy.
     368
     3691.  Copy the lighttpd config template file from your mythweb
     370sources to your lighttpd configuration directory:
     371
     372# cp -vi ./mythweb.conf.lighttpd /etc/lighttpd/mythweb.conf.lighttpd
     373
     374Be sure to edit it for any particulars of your setup.
     375
     3762.  Edit your main lighttpd.conf file and add an include (with any
     377path adjustments, depending on where you stored it):
     378
     379include "/etc/lighttpd/mythweb.conf.lighttpd"
     380
     3813.  For HTTP Digest authentication, create the credentials file (see
     382the htdigest documentation for more detail):
     383
     384# htdigest -c /etc/lighttpd/mythweb.htdigest 'Authorized MythWebbers' tom
     385
     3864.  Set up a hostname that begins with "mythweb", pointing to an IP on
     387which your lighttpd server is listening.
     388
     3894a.  For DNS: If you run your own DNS, add an "A" record for
     390mythweb.whatever.
     391
     3924b.  For /etc/hosts: On all of your client browser machines, add
     393something like the following to /etc/hosts:
     394
     395192.186.0.3     mythweb.local mythweb
     396
     397Be sure to substitute the IP address at which lighttpd is reachable,
     398of course.  Also, take note that some systems are particular about the
     399whitespace between the IP address and the hostname in /etc/hosts --
     400sometimes it must consist of tab (^H) characters.
     401
     402Then...  Restart lighttpd and go!
     403
     404Assuming you set it up this way, simply direct your browser to
     405http://mythweb.local/ and enjoy.
    370406
    371407=======
    3724087.0 PHP
  • mythweb.conf.lighttpd

    diff --git a/mythweb.conf.lighttpd b/mythweb.conf.lighttpd
    index c1f9f5f..a575e11 100644
    a b  
    11# This is a user supplied example file. Please modify before use
    22
    33# 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"
    1610
    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"
    3022    )
     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.
    3128
    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",
    3536        "db_name"     => "mythconverg",
    3637        "db_login"    => "mythtv",
    37         "db_password" => "password"
    38     )
     38        "db_password" => "mythtv"
     39      )
     40    ))
     41  )
    3942
    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.
    4346
    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  )
    5070}