support for extra host config
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-12-15 10:59:53 +01:00
parent bc8f5967c4
commit dfc8640b17
8 changed files with 18 additions and 11 deletions

View File

@@ -17,13 +17,20 @@ chown "${PUID}:${GROUPNAME}" "${WEBROOT}" -R
find "${WEBROOT}" -type d -exec chmod 0755 {} \;
find "${WEBROOT}" -type f -exec chmod 0644 {} \;
envsubst < /app/nginx.conf.tpl > /etc/nginx/http.d/default.conf
# start php
case "${PHP}" in
"php84") /usr/sbin/php-fpm84 -D ;;
"php83") /usr/sbin/php-fpm83 -D ;;
"php82") /usr/sbin/php-fpm82 -D ;;
"php84")
cp /app/nginx/php84.conf /etc/nginx/custom.d/
/usr/sbin/php-fpm84 -D
;;
"php83")
cp /app/nginx/php83.conf /etc/nginx/custom.d/
/usr/sbin/php-fpm83 -D
;;
"php82")
cp /app/nginx/php82.conf /etc/nginx/custom.d/
/usr/sbin/php-fpm82 -D
;;
*) ;;
esac

View File

@@ -18,10 +18,9 @@ server {
# autoindex_localtime on;
}
#error_page 404 /404.html;
error_page 404 /404.html;
location = /404.html {
internal;
internal;
}
# redirect server error pages to the static page /50x.html
@@ -31,8 +30,6 @@ server {
root /usr/share/nginx/html;
}
include /etc/nginx/custom.d/${PHP}.conf;
gzip on;
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript text/x-js image/x-icon font/woff2 font/woff application/x-font-woff;
@@ -43,4 +40,6 @@ server {
if_modified_since exact;
add_header Pragma "public";
add_header Cache-Control "max-age=31536000, public";
include /etc/nginx/custom.d/*.conf;
}