From 57ab0b57b2f94a2d86eede59e2cccc9595819c0f Mon Sep 17 00:00:00 2001 From: "Niels G. W. Serup" Date: Sun, 23 Aug 2020 01:10:19 +0200 Subject: [PATCH] Simplify natur nginx config. --- natur/natur.nginx.conf | 9 +++++++++ natur/nginx/base.conf | 11 ----------- natur/nginx/site.conf | 19 ------------------- 3 files changed, 9 insertions(+), 30 deletions(-) create mode 100644 natur/natur.nginx.conf delete mode 100644 natur/nginx/base.conf delete mode 100644 natur/nginx/site.conf diff --git a/natur/natur.nginx.conf b/natur/natur.nginx.conf new file mode 100644 index 0000000..03a7016 --- /dev/null +++ b/natur/natur.nginx.conf @@ -0,0 +1,9 @@ +root /home/niels/www/metanohi-misc-subsites/natur; +index index.html index.php; + +location ~* \.php$ { + fastcgi_pass unix:/run/phpfpm/main.sock; + include /etc/nginx/fastcgi.conf; +} + +error_page 404 /index.php; diff --git a/natur/nginx/base.conf b/natur/nginx/base.conf deleted file mode 100644 index c76fa13..0000000 --- a/natur/nginx/base.conf +++ /dev/null @@ -1,11 +0,0 @@ -server_name natur.metanohi.name www.natur.metanohi.name nature.metanohi.name www.nature.metanohi.name; - -root /home/niels/prog/metanohi-misc-subsites/natur; -index index.html index.php; - -location ~ \.php$ { - include snippets/fastcgi-php.conf; - fastcgi_pass unix:/run/php/php7.0-fpm.sock; -} - -error_page 404 /index.php; diff --git a/natur/nginx/site.conf b/natur/nginx/site.conf deleted file mode 100644 index 089d11b..0000000 --- a/natur/nginx/site.conf +++ /dev/null @@ -1,19 +0,0 @@ -server { - listen 80; - listen [::]:80; - - include /etc/nginx/snippets/letsencrypt.conf; - include /etc/nginx/basics/niels/natur.metanohi.name.conf; -} - -server { - listen 443 ssl http2; - listen [::]:443 ssl http2; - - ssl_certificate /etc/letsencrypt/live/natur.metanohi.name/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/natur.metanohi.name/privkey.pem; - ssl_trusted_certificate /etc/letsencrypt/live/natur.metanohi.name/fullchain.pem; - - include /etc/nginx/snippets/ssl.conf; - include /etc/nginx/basics/niels/natur.metanohi.name.conf; -}