From 281fb4233199aa4ccbd50e8110685f8b6ebbe18d Mon Sep 17 00:00:00 2001 From: Nico Rey Date: Sun, 27 Sep 2020 20:31:44 -0300 Subject: [PATCH] install sqlite, php and php sqlite driver, modify nginx template --- install.sh | 5 ++++- templates/nginx.cfg | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 742f6f1..812e9f6 100755 --- a/install.sh +++ b/install.sh @@ -54,7 +54,10 @@ sudo apt install -yq predict \ libxft2 \ libjpeg9 \ libjpeg9-dev \ - socat + socat \ + php7.2-fpm \ + php7.2-sqlite \ + sqlite3 sudo pip3 install numpy ephem tweepy Pillow log_done "Packages installed" diff --git a/templates/nginx.cfg b/templates/nginx.cfg index aacb918..7e5979a 100644 --- a/templates/nginx.cfg +++ b/templates/nginx.cfg @@ -1,7 +1,7 @@ server { listen 80 default_server; root /var/www/wx; - index index.html index.htm index.nginx-debian.html; + index index.php index.html index.htm index.nginx-debian.html; autoindex on; server_name wx.home; @@ -9,4 +9,9 @@ server { location / { try_files $uri $uri/ =404; } + + location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; + } }