summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2012-07-15 23:37:02 +0000
committerDoug Goldstein <cardoe@gentoo.org>2012-07-15 23:37:02 +0000
commite4be39761487f11a6f7179b795227175c233ac30 (patch)
tree550100373d3608c6656a17e3c3d29d49f663cfa2 /www-apps/mythweb/files
parentMask the development version of mythweb. (diff)
downloadgentoo-2-e4be39761487f11a6f7179b795227175c233ac30.tar.gz
gentoo-2-e4be39761487f11a6f7179b795227175c233ac30.tar.bz2
gentoo-2-e4be39761487f11a6f7179b795227175c233ac30.zip
Version bump with patches from upstream. Attempted to cleanup the ebuild and set defaults in the config files based on what webapp-config has set. Additionally added initial support for nginx in additional to the officially supported Apache and lighttpd.
(Portage version: 2.1.10.65/cvs/Linux x86_64)
Diffstat (limited to 'www-apps/mythweb/files')
-rw-r--r--www-apps/mythweb/files/mythweb.conf.nginx30
-rw-r--r--www-apps/mythweb/files/reconfig35
2 files changed, 65 insertions, 0 deletions
diff --git a/www-apps/mythweb/files/mythweb.conf.nginx b/www-apps/mythweb/files/mythweb.conf.nginx
new file mode 100644
index 000000000000..727f68ea8a71
--- /dev/null
+++ b/www-apps/mythweb/files/mythweb.conf.nginx
@@ -0,0 +1,30 @@
+location /mythweb/ {
+ root /var/www/localhost/htdocs;
+ auth_basic "MythWeb";
+ auth_basic_user_file /var/www/htpasswd;
+ index /mythweb/mythweb.php;
+ try_files $uri @handler;
+}
+
+location ~ /mythweb/.+\.php {
+ root /var/www/localhost/htdocs;
+ include fastcgi_params;
+ fastcgi_index mythweb.php;
+ fastcgi_split_path_info ^(.+\.php)(/?.+)$;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ fastcgi_param db_server localhost;
+ fastcgi_param db_name mythconverg;
+ fastcgi_param db_login mythtv;
+ fastcgi_param db_password mythtv;
+ fastcgi_param hostname mythtv.cardoe.com;
+ fastcgi_pass 127.0.0.1:9000;
+}
+
+location @handler {
+ root /var/www/localhost/htdocs;
+ rewrite /mythweb/(.+\.(php|pl))/.* /mythweb/$1 last;
+ rewrite /mythweb/(pl(/.*)?)$ /mythweb/mythweb.pl/$1 last;
+ rewrite /mythweb/(.+)$ /mythweb/mythweb.php/$1 last;
+ rewrite /mythweb/(.*)$ /mythweb/mythweb.php last;
+}
diff --git a/www-apps/mythweb/files/reconfig b/www-apps/mythweb/files/reconfig
new file mode 100644
index 000000000000..d4508ea356a6
--- /dev/null
+++ b/www-apps/mythweb/files/reconfig
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+die() {
+ echo "###"
+ echo $1
+ echo "###"
+ exit 1
+}
+
+if [[ $1 = "install" ]]; then
+ if [[ "${VHOST_SERVER}" = "apache" ]]; then
+ sed -e "s|/var/www/html/data|${MY_INSTALLDIR}/data|g" \
+ -e "s|/var/www/html|${VHOST_ROOT}/${PN}|g" \
+ -i ${MY_SERVERCONFIGIR}/mythweb.conf || \
+ die "apache sed failed"
+ elif [[ "${VHOST_SERVER}" = "lighttpd" ]]; then
+ sed -e "s|/var/www/html/data|${MY_INSTALLDIR}/data|g" \
+ -e "s|/var/www/html|${VHOST_ROOT}/${PN}|g" \
+ -i ${MY_SERVERCONFIGIR}/mythweb.conf || \
+ die "lighttpd sed failed"
+ elif [[ "${VHOST_SERVER}" = "nginx" ]]; then
+ sed -e "s|/var/www/localhost/htdocs|${MY_INSTALLDIR}/htdocs|g" \
+ -i ${MY_SERVERCONFIGIR}/mythweb.include || \
+ die "nginx sed failed"
+ fi
+
+ # Ownership fixes
+ chown ${VHOST_SERVER_UID}:${VHOST_SERVER_GID} "${MY_INSTALLDIR}"/data || \
+ die "chown failed"
+
+elif [[ $1 = "clean" ]]; then
+ echo $1
+fi
+
+exit 0