From 954f6210fd0d419471123bca94895b74966123d3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Thu, 16 May 2013 21:06:25 +0200 Subject: [PATCH] - migrated to apache 2.4 --- mythplugins.spec | 10 +-- mythweb.conf => mythweb-apache.conf | 2 - mythweb-httpd.conf | 108 ++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+), 6 deletions(-) rename mythweb.conf => mythweb-apache.conf (99%) create mode 100644 mythweb-httpd.conf diff --git a/mythplugins.spec b/mythplugins.spec index e93d4ee..fe36f01 100644 --- a/mythplugins.spec +++ b/mythplugins.spec @@ -38,10 +38,11 @@ License: GPL v2 Group: Applications/Multimedia Source0: ftp://ftp.osuosl.org/pub/mythtv/%{name}-%{version}.tar.bz2 # Source0-md5: 15bd7b2f4173488966f3d761e0eacffa -Source1: mythweb.conf +Source1: mythweb-apache.conf Source2: mythweb_lighttpd.conf Source3: htdigest.sh Source4: http_servers_conf_tips.txt +Source5: mythweb-httpd.conf Patch0: mythweb-chdir.patch Patch10: %{name}-compile_fixes_for_qt_4_7.patch Patch20: %{name}-mytharchive-INT64.patch @@ -258,6 +259,7 @@ Requires: php(mysql) Requires: php(posix) Requires: webapps Requires: webserver(php) >= 4.3 +Conflicts: apache-base < 2.4.0-1 %description -n mythweb The web interface to MythTV. @@ -368,7 +370,7 @@ install -d $RPM_BUILD_ROOT%{_webapps}/%{_webapp} cp -a *.php *.pl classes configuration includes js modules skins $RPM_BUILD_ROOT%{_datadir}/mythweb ln -sf /var/cache/mythweb $RPM_BUILD_ROOT%{_datadir}/mythweb/data install %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf -install %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf +install %{SOURCE5} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf install %{SOURCE2} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/lighttpd.conf touch $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/htpasswd touch $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/htdigest @@ -392,13 +394,13 @@ rm -rf $RPM_BUILD_ROOT %triggerun -n mythweb -- apache1 < 1.3.37-3, apache1-base %webapp_unregister apache %{_webapp} -%triggerin -n mythweb -- apache < 2.2.0, apache-base +%triggerin -n mythweb -- apache-base %webapp_register httpd %{_webapp} %triggerin -n mythweb -- lighttpd %webapp_register lighttpd %{_webapp} -%triggerun -n mythweb -- apache < 2.2.0, apache-base +%triggerun -n mythweb -- apache-base %webapp_unregister httpd %{_webapp} %triggerun -n mythweb -- lighttpd diff --git a/mythweb.conf b/mythweb-apache.conf similarity index 99% rename from mythweb.conf rename to mythweb-apache.conf index 5e2234f..cec4705 100644 --- a/mythweb.conf +++ b/mythweb-apache.conf @@ -1,5 +1,3 @@ -# $Id$ - # Apache config for MythWeb. # See http://www.mythtv.org/ for information about MythTV itself. diff --git a/mythweb-httpd.conf b/mythweb-httpd.conf new file mode 100644 index 0000000..6d95c81 --- /dev/null +++ b/mythweb-httpd.conf @@ -0,0 +1,108 @@ +# 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 + + AuthType Basic + AuthName "MythTV" + AuthUserFile /etc/webapps/mythweb/htpasswd + Require valid-user + Require all granted + + +Alias /mythweb /usr/share/mythweb + + AuthType Basic + AuthName "MythTV" + AuthUserFile /etc/webapps/mythweb/htpasswd + Require valid-user + Require all granted + +# Some special instructions for the PHP files of MythWeb. + + # + # 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. + # + + SetEnv db_server "localhost" + SetEnv db_name "mythconverg" + SetEnv db_login "mythtv" + SetEnv db_password "mythtv" + + + # 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. + + php_value safe_mode 0 + + php_value memory_limit 32M + + php_value session.save_path /var/cache/mythweb/php_sessions + + php_value register_globals 0 + php_value magic_quotes_gpc 0 + php_value file_uploads 0 + php_value allow_url_fopen On + + php_value zlib.output_handler Off + php_value zlib.output_compression 16384 + php_value zlib.output_compression_level 4 + + php_value url_rewriter.tags a=href,area=href,frame=src,input=src,form=action + +# These values do not change - bug in php + php_value output_handler NULL + php_value short_open_tag 1 + +# php_flag does not work in older versions of php + php_flag output_handler "NULL" + php_flag short_open_tag "On" + + +# +# 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. +# + + +# 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] + + + + +# vim: filetype=apache -- 2.44.0