- Add Apache enabling via APACHE_HTTPD_ENABLE environement variable.

This commit is contained in:
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'
#---------------------------------------------------------------------------------------------------
#---------------------------------------------------------------------------------------------------