From f776fe121c990c747af7f9681a3604f251d4bb26 Mon Sep 17 00:00:00 2001 From: Stefan Pejcic Date: Wed, 28 Aug 2024 22:11:47 +0200 Subject: [PATCH] Create apache2.conf --- .../ubuntu_apache_mariadb/apache/apache2.conf | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 docker/ubuntu_apache_mariadb/apache/apache2.conf diff --git a/docker/ubuntu_apache_mariadb/apache/apache2.conf b/docker/ubuntu_apache_mariadb/apache/apache2.conf new file mode 100644 index 00000000..548f3285 --- /dev/null +++ b/docker/ubuntu_apache_mariadb/apache/apache2.conf @@ -0,0 +1,54 @@ +DefaultRuntimeDir ${APACHE_RUN_DIR} +PidFile ${APACHE_PID_FILE} +Timeout 300 +KeepAlive On +MaxKeepAliveRequests 100 +KeepAliveTimeout 5 +User ${APACHE_RUN_USER} +Group ${APACHE_RUN_GROUP} +HostnameLookups Off +ErrorLog ${APACHE_LOG_DIR}/error.log +LogLevel warn + +IncludeOptional mods-enabled/*.load +IncludeOptional mods-enabled/*.conf + +Include ports.conf + + + + RemoteIPHeader X-Forwarded-For + RemoteIPTrustedProxy 172.16.0.0/12 + + + + Options FollowSymLinks + AllowOverride None + Require all denied + + + + AllowOverride None + Require all granted + + + + Options Indexes FollowSymLinks + AllowOverride All + Require all granted + + +AccessFileName .htaccess + + Require all denied + + +# Log format to show real ip behind nginx proxy +LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined +LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined +LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O" common +LogFormat "%{Referer}i -> %U" referer +LogFormat "%{User-agent}i" agent + +IncludeOptional conf-enabled/*.conf +IncludeOptional sites-enabled/*.conf