From 46429ef5c73c7ee4a1a99cabc2acb916c179de11 Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@freedombone.net>
Date: Wed, 25 Jul 2018 15:43:50 +0100
Subject: [PATCH] php support for web admin in nginx config

---
 src/freedombone-utils-webadmin | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/freedombone-utils-webadmin b/src/freedombone-utils-webadmin
index 70eb0e06d..032bfaaa8 100755
--- a/src/freedombone-utils-webadmin
+++ b/src/freedombone-utils-webadmin
@@ -398,6 +398,11 @@ function install_web_admin {
       echo "    root /var/www/${local_hostname}/htdocs;";
       echo '    index index.html;';
       echo "    error_page 405 = \$uri;";
+      echo '    location ~ \.php {';
+      echo '      include snippets/fastcgi-php.conf;';
+      echo '      fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;';
+      echo '      fastcgi_read_timeout 30;';
+      echo '    }';
       echo '  }';
       echo '';
       echo '  location /icons {';
@@ -434,6 +439,11 @@ function install_web_admin {
       echo "    root /var/www/${local_hostname}/htdocs;";
       echo '    index index.html;';
       echo "    error_page 405 = \$uri;";
+      echo '    location ~ \.php {';
+      echo '      include snippets/fastcgi-php.conf;';
+      echo '      fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;';
+      echo '      fastcgi_read_timeout 30;';
+      echo '    }';
       echo '  }';
       echo '';
       echo '  location /icons {';
-- 
GitLab