- Add Apache enabling via APACHE_HTTPD_ENABLE environement variable.

This commit is contained in:
Arnaud G. GIBERT 2024-12-31 20:02:25 +01:00
parent 56e78a5132
commit c3f77114c3
5 changed files with 25 additions and 9 deletions

View File

@ -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'
#---------------------------------------------------------------------------------------------------
#---------------------------------------------------------------------------------------------------

View File

@ -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!

View File

@ -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
------------------------------------------------------------------------------------------------------------------------------------

View File

@ -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}"]

View File

@ -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"