From 71dfb19647256cef180582c656962e4e627ad291 Mon Sep 17 00:00:00 2001 From: d3vyce Date: Sun, 2 Apr 2023 11:56:32 -0400 Subject: [PATCH] Fix nginx conf --- Dockerfile | 2 +- d3vyce.conf => default.conf.template | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) rename d3vyce.conf => default.conf.template (55%) diff --git a/Dockerfile b/Dockerfile index bdc9b88..b51d14f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ FROM nginx COPY html/ /usr/share/nginx/html -COPY d3vyce.conf /etc/nginx/conf.d/d3vyce.conf +COPY default.conf.template /etc/nginx/templates diff --git a/d3vyce.conf b/default.conf.template similarity index 55% rename from d3vyce.conf rename to default.conf.template index 8bfe608..8ea3c2b 100644 --- a/d3vyce.conf +++ b/default.conf.template @@ -8,6 +8,9 @@ server { server_name _; + ssl_certificate /config/keys/cert.crt; + ssl_certificate_key /config/keys/cert.key; + client_max_body_size 0; location / { @@ -17,5 +20,12 @@ server { try_files $uri $uri.html $uri/ =404; } + location ~ ^(.+\.php)(.*)$ { + fastcgi_split_path_info ^(.+\.php)(.*)$; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + } + error_page 404 /404-error.html; }