diff --git a/Dockerfile b/Dockerfile index ba1e698..ea11ff9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,15 +27,20 @@ ARG HTTPD='#!/bin/bash usermod -u ${APACHE_UID} apache \n\ groupmod -g ${APACHE_GID} apache \n\ \n\ -chown -R apache:apache /var/log/httpd \n\ - \n\ -for file in /etc/httpd/conf/httpd.conf /etc/httpd/conf/conf.d/rx3.conf \n\ -do \n\ - sed -i -e "s%/var/www/html%${APACHE_DOC_ROOT}%" ${file} \n\ -done \n\ - \n\ chgrp apache /usr/bin/pwauth \n\ -chmod u+s /usr/bin/pwauth' +chmod u+s /usr/bin/pwauth \n\ + \n\ +if [[ "${APACHE_HTTPD_ENABLED}" )= "FALSE" ]] \n\ +then \n\ + mv /etc/supervisord.d/httpd.ini /etc/supervisord.d/httpd.ini.disabled \n\ +else \n\ + chown -R apache:apache /var/log/httpd \n\ + \n\ + for file in /etc/httpd/conf/httpd.conf /etc/httpd/conf/conf.d/rx3.conf \n\ + do \n\ + sed -i -e "s%/var/www/html%${APACHE_DOC_ROOT}%" ${file} \n\ + done \n\ +fi' #--------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------- diff --git a/ReadMe.txt b/ReadMe.txt index f6259e2..78cb840 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -10,7 +10,8 @@ Features: - PHPMailer installed, - logrotate configured, - Apache UID, GID & document root directory configurable, - - mod_proxy + mod_proxy_html installed. + - mod_proxy + mod_proxy_html installed, + - HTTPD service enabled by default. Enjoy it! diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 9a5990d..01d2218 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,3 +1,11 @@ +------------------------------------------------------------------------------------------------------------------------------------ +Rx3-Docker/PHP-Apache V 1.5.1 - A. GIBERT - 2024/12/31 +------------------------------------------------------------------------------------------------------------------------------------ + +- Add Apache enabling via APACHE_HTTPD_ENABLE environement variable. + + + ------------------------------------------------------------------------------------------------------------------------------------ Rx3-Docker/PHP-Apache V 1.5.0 - A. GIBERT - 2024/12/21 ------------------------------------------------------------------------------------------------------------------------------------ diff --git a/compose.yaml b/compose.yaml index bd3197f..1d20ad0 100644 --- a/compose.yaml +++ b/compose.yaml @@ -31,6 +31,7 @@ services: APACHE_UID: ${WA_USER_ID} APACHE_GID: ${WA_GROUP_ID} APACHE_DOC_ROOT: ${WA_DOC_ROOT} + APACHE_HTTPD_ENABLED: ${WA_APACHE_HTTPD_ENABLED} healthcheck: test: ["CMD", "curl", "-f", "http://localhost:${WA_PORT_MAIN_INT}"] diff --git a/env.dist b/env.dist index 689f9a2..c724d5a 100644 --- a/env.dist +++ b/env.dist @@ -48,3 +48,4 @@ docker_service_add WA webapp ${ORG_URL_PREFIX} SERVER_CROND_ENABLED="FALSE" WA_DOC_ROOT="/var/www/html" +WA_APACHE_HTTPD_ENABLED="TRUE"