How to add custom apache config #52
-
Hi there, I have a custom apache config that I add to the image:
The contents of this file is;
However, I cannot see the json logs in the terminal when visiting a page. What can I do to achieve this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Hello, thank you for asking the question. To add your configs for Apache, you can copy your *.conf files into the 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/custom-logging.conf
EOF Access logs
Please let me know if you have any other questions or concerns - we're committed to making this a seamless process. Best regards. |
Beta Was this translation helpful? Give feedback.
@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