summaryrefslogtreecommitdiff
path: root/www-apps/mythweb/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /www-apps/mythweb/files
reinit the tree, so we can have metadata
Diffstat (limited to 'www-apps/mythweb/files')
-rw-r--r--www-apps/mythweb/files/0.25-postinstall-en.txt9
-rw-r--r--www-apps/mythweb/files/mythweb.conf.nginx30
-rw-r--r--www-apps/mythweb/files/reconfig39
3 files changed, 78 insertions, 0 deletions
diff --git a/www-apps/mythweb/files/0.25-postinstall-en.txt b/www-apps/mythweb/files/0.25-postinstall-en.txt
new file mode 100644
index 000000000000..0848d60cfa0f
--- /dev/null
+++ b/www-apps/mythweb/files/0.25-postinstall-en.txt
@@ -0,0 +1,9 @@
+You probably want to modify
+${VHOST_CONFDIR}/mythweb.include
+to fit your needs and load it into your web server
+configuration.
+
+In order to prevent unauthorized access to your MythTV
+installation, MythWeb can be configured to require
+authentication using htdigest or htpasswd. See
+${VHOST_CONFDIR}/mythweb.include for more info.
diff --git a/www-apps/mythweb/files/mythweb.conf.nginx b/www-apps/mythweb/files/mythweb.conf.nginx
new file mode 100644
index 000000000000..2737de91c931
--- /dev/null
+++ b/www-apps/mythweb/files/mythweb.conf.nginx
@@ -0,0 +1,30 @@
+location /mythweb/ {
+ root VHOST_HTDOCS;
+ auth_basic "MythWeb";
+ auth_basic_user_file /var/www/htpasswd;
+ index VHOST_APPDIR/mythweb.php;
+ try_files $uri @handler;
+}
+
+location ~ /mythweb/.+\.php {
+ root VHOST_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 VHOST_HTDOCS;
+ rewrite VHOST_APPDIR/(.+\.(php|pl))/.* VHOST_APPDIR/$1 last;
+ rewrite VHOST_APPDIR/(pl(/.*)?)$ VHOST_APPDIR/mythweb.pl/$1 last;
+ rewrite VHOST_APPDIR/(.+)$ VHOST_APPDIR/mythweb.php/$1 last;
+ rewrite VHOST_APPDIR/(.*)$ VHOST_APPDIR/mythweb.php last;
+}
diff --git a/www-apps/mythweb/files/reconfig b/www-apps/mythweb/files/reconfig
new file mode 100644
index 000000000000..01ab9aacff7a
--- /dev/null
+++ b/www-apps/mythweb/files/reconfig
@@ -0,0 +1,39 @@
+#!/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|${MY_INSTALLDIR}|g" \
+ ${MY_SERVERCONFIGDIR}/${VHOST_SERVER}-mythweb.conf > \
+ ${VHOST_CONFDIR}/mythweb.include || \
+ die "apache sed failed"
+ elif [[ "${VHOST_SERVER}" = "lighttpd" ]]; then
+ sed -e "s|/var/www/localhost/htdocs/mythweb|${MY_INSTALLDIR}|g" \
+ ${MY_SERVERCONFIGDIR}/${VHOST_SERVER}-mythweb.conf > \
+ ${VHOST_CONFDIR}/mythweb.include || \
+ die "lighttpd sed failed"
+ elif [[ "${VHOST_SERVER}" = "nginx" ]]; then
+ sed -e "s|VHOST_HTDOCS|${VHOST_HTDOCSDIR}|g" \
+ -e "s|VHOST_APPDIR|${VHOST_APPDIR}|g" \
+ ${MY_SERVERCONFIGDIR}/${VHOST_SERVER}-mythweb.include > \
+ ${VHOST_CONFDIR}/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