From 90f4a0c71d6e9e67880010308f6cdbc6c301f129 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Mon, 19 Sep 2022 18:53:02 -0400 Subject: [PATCH] Add book server conf block --- .../Server Blocks/book.libraryofcode.org.conf | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Nginx/Server Blocks/book.libraryofcode.org.conf diff --git a/Nginx/Server Blocks/book.libraryofcode.org.conf b/Nginx/Server Blocks/book.libraryofcode.org.conf new file mode 100644 index 0000000..646c0bf --- /dev/null +++ b/Nginx/Server Blocks/book.libraryofcode.org.conf @@ -0,0 +1,24 @@ +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name book.libraryofcode.org; + + ssl_certificate /etc/nginx/ssl/org.chain.crt; + ssl_certificate_key /etc/nginx/ssl/org.key.pem; + + root /opt/book; + + index index.html index.htm index.php; + + + location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/run/php/php7.0-fpm.sock; + fastcgi_param HTACCESS on; + proxy_read_timeout 800; + } + + if (!-e $request_filename){ + rewrite ^(.*)$ /index.php?/$1 last; + } +}