Skip to content

How to add custom apache config #52

Closed Answered by shinsenter
Thijmen asked this question in Q&A
Discussion options

You must be logged in to vote

@Thijmen

Hello, thank you for asking the question.

To add your configs for Apache, you can copy your *.conf files into the /etc/apache2/sites-enabled/ directory of the container.

I tried testing with the following Dockerfile and confirmed the access log was able to output in a JSON-like format:

Dockerfile

FROM shinsenter/php:8.3-fpm-apache
RUN <<'EOF'
echo '
LogFormat "{ \"time\":\"%t\", \"remoteIP\":\"%a\", \"host\":\"%V\", \"request\":\"%U\", \"query\":\"%q\", \"method\":\"%m\", \"status\":\"%>s\", \"userAgent\":\"%{User-agent}i\", \"referer\":\"%{Referer}i\", \"originalUri\": \"%{Plugin-Original-Uri}i\" }" combined
CustomLog ${APACHE_ACCESS_LOG} combined
' >/etc/apache2/sites-enabled/c…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@Thijmen
Comment options

@shinsenter
Comment options

@Thijmen
Comment options

@shinsenter
Comment options

@Thijmen
Comment options

Answer selected by Thijmen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #49 on February 08, 2024 04:10.