Add custom nginx conf
All checks were successful
docker-build

This commit is contained in:
d3vyce 2023-04-02 11:37:58 -04:00
parent b71e46a786
commit e4eeddcbf4
2 changed files with 33 additions and 1 deletions

View File

@ -1,2 +1,3 @@
FROM nginx
COPY html/ /usr/share/nginx/html
COPY html/ /usr/share/nginx/html
COPY default.conf /etc/nginx/nginx.d/default.conf

31
default.conf Normal file
View File

@ -0,0 +1,31 @@
server {
listen 80 default_server;
listen 443 ssl;
root /config/www;
index index.html index.htm index.php;
server_name _;
ssl_certificate /config/keys/cert.crt;
ssl_certificate_key /config/keys/cert.key;
client_max_body_size 0;
location / {
if ($request_uri ~ ^/(.*)\.html) {
return 302 /$1;
}
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;
}