diff --git a/Dockerfile b/Dockerfile index ac136d4..2b29617 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,5 +5,6 @@ RUN npm i RUN npm run build FROM httpd:2.4-alpine AS runtime +COPY --from=build httpd.conf /usr/local/apache2/conf/httpd.conf COPY --from=build /app/dist /usr/local/apache2/htdocs/ EXPOSE 80 diff --git a/httpd.conf b/httpd.conf new file mode 100644 index 0000000..a9c7f5d --- /dev/null +++ b/httpd.conf @@ -0,0 +1,6 @@ +# Fields to record - use X-Forward-For instead of client IP so that we get the actual clients IP +LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" mycustom + +# Log locations +CustomLog "/var/log/httpd/access.log" mycustom env=!dontlog +ErrorLog "/var/log/httpd/error.log"