]> git.pld-linux.org Git - packages/mythplugins.git/blobdiff - mythweb.conf
- patch cleanup
[packages/mythplugins.git] / mythweb.conf
index 4318ff1c8af54347a36c9281acdf621860736731..5e2234f14928ecf20fee4d9429dcf1b0b65bfbd5 100644 (file)
@@ -1,38 +1,64 @@
 # $Id$
 
+# Apache config for MythWeb.
+# See http://www.mythtv.org/ for information about MythTV itself.
+
+# MythTV now uses the correct file suffix for mpeg files, so all .nuv files
+# should actually be NuppleVideo. However, Apache probably doesn't know what
+# those are, so we should tell it.
+AddType video/nuppelvideo .nuv
+
+Alias /mythweb/image_cache /var/cache/mythweb/image_cache
+<Directory /var/cache/mythweb/image_cache>
+       AuthType Basic
+       AuthName "MythTV"
+       AuthUserFile /etc/webapps/mythweb/htpasswd
+       Require valid-user
+       Allow from all
+</Directory>
+
 Alias /mythweb /usr/share/mythweb
 <Directory /usr/share/mythweb>
-
-<IfModule !mod_auth.c>
-    deny from all
-    allow from localhost
-</IfModule>
-<IfModule mod_auth.c>
     AuthType Basic
     AuthName "MythTV"
-    AuthUserFile /etc/mythweb/htpasswd
+    AuthUserFile /etc/webapps/mythweb/htpasswd
     Require valid-user
-    allow from all
+    Allow from all
+
+# Some special instructions for the PHP files of MythWeb.
+<FilesMatch "\.php$">
+    #
+    # Use the following environment settings to tell MythWeb where you want it to
+    # look to connect to the database, the name of the database to connect to, and
+    # the authentication info to use to connect.  The defaults will usually work
+    # fine unless you've changed mythtv's mysql.txt file, or are running MythWeb on
+    # a different server from your main backend.  Make sure you have mod_env enabled.
+    #
+<IfModule mod_env.c>
+    SetEnv db_server        "localhost"
+    SetEnv db_name          "mythconverg"
+    SetEnv db_login         "mythtv"
+    SetEnv db_password      "mythtv"
 </IfModule>
 
-# If you have nuv files that are actually mpeg2 files, uncomment this
-#AddType video/mpeg .nuv
-# If you have normal software-encoded nuv files, use this type
-#AddType video/nuppelvideo .nuv
+    # By default, php will always search the current directory for include files,
+    # but if you wish to install these directories outside of the current path
+    # (eg. for security reasons), set this variable to the directory that
+    # contains the directories like languages and templates.  eg.
+    #
+    #   setenv include_path      "/usr/share/mythweb"
+
+    #  These settings are intended for apache 2.x.  If your version of apache
+    #  doesn't support php_value, or things like memory_limit aren't working
+    #  as expected, then use these settings as examples for your own php.ini
+    #  files.
 
-# Some special handlers for php
-#  These settings are intended for apache 2.x.  If your version of apache
-#  doesn't support php_value, or things like memory_limit aren't working
-#  as expected, then use these settings as examples for your own php.ini
-#  files.
-<FilesMatch "\.php$">
     php_value safe_mode                     0
 
     php_value memory_limit                  32M
 
     php_value session.save_path             /var/cache/mythweb/php_sessions
 
-    php_value output_buffering              4096
     php_value register_globals              0
     php_value magic_quotes_gpc              0
     php_value file_uploads                  0
@@ -51,9 +77,34 @@ Alias /mythweb /usr/share/mythweb
 # php_flag does not work in older versions of php
     php_flag output_handler                 "NULL"
     php_flag short_open_tag                 "On"
-
 </FilesMatch>
 
+#
+# The settings below relate specifically to mod_rewrite and the rewrite engine
+# used to make the MythWeb user experience a little easier to deal with by
+# simplifying the URL's neeced to access the various sections.  Do not touch
+# these settings.
+#
+
+<IfModule mod_rewrite.c>
+# Turn on the rewrite engine
+    RewriteEngine  on
+    RewriteBase    /mythweb/
+
+# Skip out early if we've already been through rewrites,
+# or if this is a /css/, /js/ or /cache/ directory request.
+    RewriteRule    ^(css|data|images|js|themes|skins|[a-z_]+\.php)(/|$)     -     [L]
+
+# Redirect most of the remaining URL requests to the main cooktools script.
+# It will then handle any requests given to it.
+    RewriteRule     ^(.+)$                  mythweb.php/$1              [QSA,L]
+    RewriteRule     ^(.*)$                  mythweb.php                 [QSA,L]
+
+# If you're experiencing trouble with the previous line in your copy of apache,
+# you could also use something like:
+#    RewriteRule     ^([\w\-]+(/.*)?)?$      mythweb.php?PATH_INFO=/$1   [L,QSA]
+</IfModule>
+
 </Directory>
 
-# vim: filetype=apache ts=4 sw=4 et
+# vim: filetype=apache
This page took 0.152257 seconds and 4 git commands to generate.