diff --git a/rootfs/tmp/etc/nginx/nginx.conf b/rootfs/tmp/etc/nginx/nginx.conf index 2a1ee81..7361a11 100644 --- a/rootfs/tmp/etc/nginx/nginx.conf +++ b/rootfs/tmp/etc/nginx/nginx.conf @@ -33,14 +33,20 @@ http { location /health { default_type text/plain; return 200 'ok'; + access_log off; + log_not_found on; } location /health/text { default_type text/plain; return 200 'ok'; + access_log off; + log_not_found on; } location /health/json { default_type application/json; return 200 '{"status":"ok","message":"running"}'; + access_log off; + log_not_found on; } location ~ [^/]\.php(/|$) { @@ -74,18 +80,9 @@ http { } location / { - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade; - proxy_pass http://127.0.0.1:8000/; + root REPLACE_SERVER_WWW_DIR; + access_log on; + log_not_found on; } - - include /etc/nginx/conf.d/*.conf; - include /etc/nginx/sites-enabled/*; - include /etc/nginx/vhosts.d/*.conf; } } diff --git a/rootfs/usr/local/bin/entrypoint.sh b/rootfs/usr/local/bin/entrypoint.sh index 1e0cb74..a10a3c4 100755 --- a/rootfs/usr/local/bin/entrypoint.sh +++ b/rootfs/usr/local/bin/entrypoint.sh @@ -88,8 +88,8 @@ WEB_SERVER_PORT="" # port : 80,443 SERVER_PORTS="" # specifiy other ports # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Server directories -WWW_ROOT_DIR="" # set default web dir -DATABASE_DIR="" # set database dir +WWW_ROOT_DIR="${WWW_ROOT_DIR:-/usr/share/httpd/default}" # set default web dir +DATABASE_DIR="${DATABASE_DIR:-/data/db/${DBTYPE:-sqlite}}" # set database dir # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Healthcheck variables HEALTH_ENABLED="yes" # enable healthcheck [yes/no] diff --git a/rootfs/usr/local/etc/docker/init.d/99-nginx.sh b/rootfs/usr/local/etc/docker/init.d/99-nginx.sh index 541cfc1..cc48301 100755 --- a/rootfs/usr/local/etc/docker/init.d/99-nginx.sh +++ b/rootfs/usr/local/etc/docker/init.d/99-nginx.sh @@ -73,7 +73,7 @@ DATABASE_BASE_DIR="${DATABASE_BASE_DIR:-/data/db}" DATABASE_DIR="${DATABASE_DIR_NGINX:-$DATABASE_BASE_DIR/sqlite}" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Set webroot -WWW_ROOT_DIR="/usr/share/httpd/stikked" +WWW_ROOT_DIR="/usr/share/httpd/default" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Default predefined variables DATA_DIR="/data/nginx" # set data directory