summary refs log tree commit diff stats
path: root/swag/etc-config-swag
diff options
context:
space:
mode:
Diffstat (limited to 'swag/etc-config-swag')
-rw-r--r--swag/etc-config-swag/nginx/proxy-confs/pmwiki.subdomain.conf21
-rwxr-xr-xswag/etc-config-swag/www/rss_update.sh (renamed from swag/etc-config-swag/www/rss/update.sh)4
-rwxr-xr-xswag/etc-config-swag/www/wiki_update.sh12
3 files changed, 36 insertions, 1 deletions
diff --git a/swag/etc-config-swag/nginx/proxy-confs/pmwiki.subdomain.conf b/swag/etc-config-swag/nginx/proxy-confs/pmwiki.subdomain.conf
new file mode 100644
index 0000000..8ae783e
--- /dev/null
+++ b/swag/etc-config-swag/nginx/proxy-confs/pmwiki.subdomain.conf
@@ -0,0 +1,21 @@
+server {
+    listen 443 ssl http2;
+    listen [::]:443 ssl http2;
+
+    server_name w.*;
+  
+    include /config/nginx/ssl.conf;
+
+    client_max_body_size 0;
+
+    root /config/www/wiki;
+
+    index index.php pmwiki.php;
+
+    location ~ ^(.+\.php)(.*)$ {
+        fastcgi_split_path_info ^(.+\.php)(.*)$;
+        fastcgi_pass 127.0.0.1:9000;
+        fastcgi_index index.php;
+        include /etc/nginx/fastcgi_params;
+    }
+}
diff --git a/swag/etc-config-swag/www/rss/update.sh b/swag/etc-config-swag/www/rss_update.sh
index 0edd021..97b4b31 100755
--- a/swag/etc-config-swag/www/rss/update.sh
+++ b/swag/etc-config-swag/www/rss_update.sh
@@ -1,5 +1,7 @@
 #!/bin/sh
 LINK=https://raw.githubusercontent.com/tontof/kriss_feed/master/
 FILENAME=index.php
+SUBFOLDER="$(dirname "$0")/rss/"
 
-wget -O $(dirname "$0")/$FILENAME $LINK$FILENAME
+mkdir $SUBFOLDER
+wget -O $SUBFOLDER$FILENAME $LINK$FILENAME
diff --git a/swag/etc-config-swag/www/wiki_update.sh b/swag/etc-config-swag/www/wiki_update.sh
new file mode 100755
index 0000000..8a9e7f0
--- /dev/null
+++ b/swag/etc-config-swag/www/wiki_update.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+LINK=https://pmwiki.org/pub/pmwiki/
+FILENAME=pmwiki-latest.tgz
+SCRIPT_PATH=$(dirname "$0")
+DOWNLOADED_PATH=$SCRIPT_PATH/$FILENAME
+
+wget -O $DOWNLOADED_PATH $LINK$FILENAME
+tar zxvf $DOWNLOADED_PATH
+
+var=(pmwiki-*)
+mv $var wiki
+rm $DOWNLOADED_PATH