Advertisement
Guest User

Untitled

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