Guest User

mythweb.conf

a guest
Jul 17th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.00 KB | None | 0 0
  1. #
  2. # Apache configuration directives for MythWeb. Please read INSTALL for setup
  3. # requirements and troubleshooting, along with the comments in this file.
  4. #
  5.  
  6. ############################################################################
  7. # If you intend to use authentication for MythWeb (see below), you will
  8. # probably also want to uncomment the following rules, which disable
  9. # authentication for MythWeb's download URLs so you can properly stream
  10. # to media players that don't work with authenticated servers.
  11. #
  12. # <LocationMatch .*/pl/stream/[0-9]+/[0-9]+>
  13. # Allow from all
  14. # </LocationMatch>
  15. #
  16. # <LocationMatch .*/music/stream.php>
  17. # Allow from all
  18. # </LocationMatch>
  19.  
  20.  
  21. #
  22. # CHANGE THESE PATHS TO MATCH YOUR MYTHWEB INSTALLATION DIRECTORY! e.g.
  23. #
  24. # /var/www
  25. # /home/www/htdocs
  26. # /var/www/html/mythweb
  27. # /srv/www/htdocs/mythweb
  28. #
  29. # <Directory "/var/www/html/data">
  30. <Directory "/srv/http/mythweb/data">
  31.  
  32. # For Apache 2.2
  33. #Options -All +FollowSymLinks +IncludesNoExec
  34. # For Apache 2.4+
  35. Options +FollowSymLinks +IncludesNoExec
  36. </Directory>
  37. # <Directory "/var/www/html" >
  38. <Directory "/srv/http/mythweb" >
  39.  
  40. ############################################################################
  41. # I *strongly* urge you to turn on authentication for MythWeb. It is disabled
  42. # by default because it requires you to set up your own password file. Please
  43. # see the man page for htdigest and then configure the following four directives
  44. # to suit your authentication needs.
  45. #
  46. # AuthType Digest
  47. # AuthName "MythTV"
  48. # AuthUserFile /etc/httpd/conf/extra/httpd-passwords
  49. # Require valid-user
  50. # BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
  51. # Order allow,deny#
  52. # Allow from 127. 192.168.1. 10.1.10.
  53. # Satisfy any
  54. #
  55. # * If you're running Apache earlier than 2.2, you will need to use
  56. # the AuthDigestFile command instead of AuthUserFile (3rd line above).
  57. #
  58. ############################################################################
  59. # Some special instructions for the MythWeb controller files
  60. #
  61. <Files mythweb.*>
  62.  
  63. #
  64. # Use the following environment settings to tell MythWeb where you want it to
  65. # look to connect to the database, the name of the database to connect to, and
  66. # the authentication info to use to connect. The defaults will usually work
  67. # fine unless you've changed mythtv's mysql.txt file, or are running MythWeb on
  68. # a different server from your main backend. Make sure you have mod_env enabled.
  69. #
  70. setenv db_server "localhost"
  71. setenv db_name "mythconverg"
  72. setenv db_login "mythtv"
  73. setenv db_password "mythtv"
  74.  
  75. #
  76. # By default, MythWeb uses the hostname program to look up the hostname of the
  77. # machine it runs on. If this reports incorrect data, or you run MythWeb on a
  78. # machine without the hostname program, set this to your current hostname.
  79. #
  80. # setenv hostname "my_mythbox"
  81. #
  82.  
  83. # By default, php will always search the current directory for include files,
  84. # but if you wish to install these directories outside of the current path
  85. # (eg. for security reasons), set this variable to the directory that
  86. # contains the directories like languages and templates. eg.
  87. #
  88. # setenv include_path "/usr/share/mythweb"
  89.  
  90. # If you want MythWeb to email php/database errors (and a backtrace) to you,
  91. # uncomment and set the email address below.
  92. #
  93. # setenv error_email "mythweb_errors@example.com"
  94. #
  95.  
  96. # If your local file system is something other than UTF-8, set this variable
  97. # so that the music and video portions of MythWeb can provide proper links
  98. # to your downloadable files.
  99. #
  100. # setenv fs_encoding "ISO-8859-1"
  101.  
  102. </Files>
  103.  
  104. ############################################################################
  105. # The following settings relate to PHP config.
  106. #
  107.  
  108. <Files *.php>
  109.  
  110. # These settings are intended for apache 2.x. If your version of apache
  111. # doesn't support php_value, or things like memory_limit aren't working
  112. # as expected, then use these settings as examples for your own php.ini
  113. # files.
  114. # php_value safe_mode 0
  115. # php_value register_globals 0
  116. # php_value magic_quotes_gpc 0
  117. # php_value file_uploads 0
  118. php_value allow_url_fopen On
  119.  
  120. php_value zlib.output_handler Off
  121. # php_value output_handler NULL
  122.  
  123. # If you have a large number of channels, you may need to increase
  124. # this value to prevent PHP from running out of memory during
  125. # searches. The default is 64M.
  126. php_value memory_limit 64M
  127. # php_value memory_limit 128M
  128. # php_value memory_limit 256M
  129. # php_value memory_limit 512M
  130.  
  131. # If you have a large number of channels, php may timeout creating
  132. # complex pages, so you will need to increase the amount of time
  133. # php has to create the page. The default is 30 seconds.
  134. # php_value max_execution_time 30
  135. # php_value max_execution_time 60
  136. # php_value max_execution_time 120
  137.  
  138. # Note: php_flag does not work in older versions of php
  139. # php_flag output_handler "NULL"
  140.  
  141. </Files>
  142.  
  143. ############################################################################
  144. # The settings below relate specifically to mod_rewrite and the rewrite
  145. # engine used to make the MythWeb user experience a little easier to deal
  146. # with by simplifying the URLs needed to access the various sections. Do
  147. # not touch these settings unless you really know what you're doing..
  148. #
  149.  
  150. # Turn on the rewrite engine
  151. RewriteEngine on
  152.  
  153. # If MythWeb is installed outside of the document root (eg. using Alias) then
  154. # you will need to set this directive to the base URL that MythWeb is visible
  155. # from externally. If you do not, the web server will return 'not found'.
  156. # RewriteBase /mythweb
  157.  
  158. # Skip out early if we've already been through rewrites,
  159. # or if this is a /css/, /js/ or /cache/ directory request.
  160. RewriteRule ^(css|data|images|js|themes|skins|README|INSTALL|[a-z_]+\.(php|pl))(/|$) - [L]
  161.  
  162. # Redirect /pl/ requests to the perl cgi handler.
  163. RewriteRule ^(pl(/.*)?)$ mythweb.pl/$1 [QSA,L]
  164.  
  165. # Redirect most of the remaining URL requests to the main mythweb script.
  166. # It will then handle any requests given to it.
  167. RewriteRule ^(.+)$ mythweb.php/$1 [QSA,L]
  168.  
  169. # If you're experiencing trouble with the previous two lines in your copy of
  170. # apache, you could instead use something like:
  171. # RewriteRule ^(pl(/.*)?)$ mythweb.pl?PATH_INFO=/$1 [L,QSA]
  172. # RewriteRule ^(.+)$ mythweb.php?PATH_INFO=/$1 [L,QSA]
  173.  
  174. # Catch anything else that comes through and send it to mythweb.php with no parameters.
  175. RewriteRule ^(.*)$ mythweb.php [QSA,L]
  176.  
  177. ############################################################################
  178. # You really shouldn't need to edit anything below this line, so please
  179. # don't unless you know what you're doing.
  180. #
  181.  
  182. # Allow .htaccess to override whatever it wants from the server config.
  183. AllowOverride All
  184.  
  185. # Allow browsers to follow symlinks that point outside of the web document
  186. # tree. This is how we access music, videos, etc.
  187. Options FollowSymLinks
  188.  
  189. # MythTV now uses the correct file suffix for mpeg files, so all .nuv files
  190. # should actually be NuppleVideo. However, apache probably doesn't know what
  191. # those are, so we should tell it.
  192. AddType video/nuppelvideo .nuv
  193.  
  194. # Specify the MIME type for favicon.ico in case the server configuration
  195. # doesn't or in case the server configuration uses the IANA-approved MIME type
  196. # (image/vnd.microsoft.icon)--which most browsers won't recognize.
  197. AddType image/x-icon .ico
  198.  
  199. # Enable mod_deflate. This works MUCH more reliably than PHP's built-in
  200. # gzip/Zlib compressors. It is disabled here because many distros seem not
  201. # to enable mod_deflate by default, but I strongly recommend that you
  202. # enable this section.
  203. #
  204. # BrowserMatch ^Mozilla/4 gzip-only-text/html
  205. # BrowserMatch ^Mozilla/4\.0[678] no-gzip
  206. # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  207. #
  208. # AddOutputFilterByType DEFLATE text/html
  209. # AddOutputFilterByType DEFLATE text/css
  210. # AddOutputFilterByType DEFLATE application/x-javascript
  211. #/etc/httpd/conf/extra/mythweb.conf
  212. # This is helpful for mod_deflate -- it prevents proxies from changing
  213. # the user agent to/from this server, which can prevent compression from
  214. # being enabled. It is disabled here because many distros seem not to
  215. # enable mod_headers by default, but I recommend that you enable it.
  216. #
  217. # Header append Vary User-Agent env=!dont-vary
  218.  
  219. # Set up the perl handler so we can stream properly. Do not use mod_perl
  220. # because it has a tendency to hold onto child processes, which causes
  221. # problems if the browser closes on an in-progress stream.
  222. #
  223. <Files *.pl>
  224. SetHandler cgi-script
  225. Options +ExecCGI
  226. </Files>
  227.  
  228. </Directory>
Add Comment
Please, Sign In to add comment