diff --git a/Dockerfile b/Dockerfile index b9faa72..f8101e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.5 +FROM php:8.5-apache # keep ordered alphabetically to reduce diffs RUN apt update && apt install -y \ @@ -38,4 +38,8 @@ RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && locale-gen \ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer ENV COMPOSER_ALLOW_SUPERUSER=1 +COPY ports.conf logs.conf /etc/apache2/conf-enabled/ +RUN a2enmod rewrite unique_id headers +EXPOSE 8080 + USER www-data:www-data diff --git a/logs.conf b/logs.conf new file mode 100644 index 0000000..6a3cbdd --- /dev/null +++ b/logs.conf @@ -0,0 +1,7 @@ +ErrorLogFormat "[uid:%{UNIQUE_ID}e] %a [ip:%a] [remote-ip:%{X-Forwarded-For}i] [%{cu}t] \"%{REQUEST_METHOD}e %{REQUEST_URI}e\" %M" +LogFormat "[uid:%{UNIQUE_ID}e] %a [ip:%h] [remote-ip:%{X-Forwarded-For}i] [%{%Y-%m-%d %H:%M:%S}t] \"%r\" %>s %b, referer: \"%{Referer}i\", user-agent: \"%{User-agent}i\"" vhost_combined +LogFormat "[uid:%{UNIQUE_ID}e] %a [ip:%h] [remote-ip:%{X-Forwarded-For}i] [%{%Y-%m-%d %H:%M:%S}t] \"%r\" %>s %b, referer: \"%{Referer}i\", user-agent: \"%{User-agent}i\"" combined + +LogLevel warn + +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet diff --git a/ports.conf b/ports.conf new file mode 100644 index 0000000..2fc834f --- /dev/null +++ b/ports.conf @@ -0,0 +1,3 @@ +Listen 8080 + +# vim: syntax=apache ts=4 sw=4 sts=4 sr noet