Fixed apache config

This commit is contained in:
2025-01-14 18:53:28 -08:00
parent 6d154446d3
commit 125e461786
2 changed files with 12 additions and 8 deletions

View File

@@ -1,8 +1,12 @@
# Use the PHP base image
#################################################################################################################################
# Project: https://git.4lt.ca/4lt/phpcontainer/
# v 5.0.1
#################################################################################################################################
FROM php:8.4.2-apache
# Set maintainer information
LABEL version="5.0.0"
LABEL version="5.0.1"
LABEL maintainer="4 Lights Consulting <info@4lt.ca>"
LABEL description="Production-ready PHP Apache container"
LABEL org.label-schema.vcs-url="https://git.4lt.ca/4lt/phpcontainer"
@@ -57,10 +61,10 @@ RUN set -eux; \
a2enconf remoteip; \
sed -ri 's/([[:space:]]*LogFormat[[:space:]]+"[^"]*)%h([^"]*")/\1%a\2/g' /etc/apache2/*.conf
# Configure Apache document root
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf; \
echo "ServerName localhost" >> /etc/apache2/apache2.conf
# More Apache settings
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
# Expose port and set command
EXPOSE 80
CMD ["apache2-foreground"]