Update config

This commit is contained in:
Micke Nordin 2023-03-29 17:19:32 +02:00
parent 471739a03f
commit e25109719f
Signed by untrusted user: Micke
GPG key ID: 0DA0A7A5708FE257

View file

@ -5,30 +5,68 @@ metadata:
data: data:
000-default.conf: | 000-default.conf: |
LoadModule remoteip_module /usr/lib/apache2/modules/mod_remoteip.so LoadModule remoteip_module /usr/lib/apache2/modules/mod_remoteip.so
LoadModule headers_module /usr/lib/apache2/modules/mod_headers.so
<VirtualHost *:80> <VirtualHost *:80>
ServerAdmin webmaster@localhost ServerAdmin webmaster@localhost
DocumentRoot /var/www/html DocumentRoot /var/www/html
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded # Log format config
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" common
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
# Header config # Header config
RemoteIPHeader X-Forwarded-For RemoteIPHeader X-Forwarded-For
RemoteIPInternalProxy 37.156.195.11 RemoteIPInternalProxy 37.156.195.14
RemoteIPInternalProxy 37.156.195.12 RemoteIPInternalProxy 37.156.195.19
RemoteIPInternalProxy 37.156.195.21 RemoteIPInternalProxy 37.156.195.84
RemoteIPInternalProxy 37.156.195.22 RemoteIPInternalProxy 37.156.195.92
# TODO: Package 404 for k8s #ErrorDocument 404 /404.html
# ErrorDocument 404 /404.html ErrorLog ${APACHE_LOG_DIR}/error.log
<Directory /var/www/html/> CustomLog ${APACHE_LOG_DIR}/access.log combined env=forwarded
LimitRequestBody 0
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
<IfModule mod_dav.c> ErrorLog ${APACHE_LOG_DIR}/error.log
Dav off CustomLog ${APACHE_LOG_DIR}/access.log combined
</IfModule> <Directory /var/www/html/>
</Directory> LimitRequestBody 0
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
</VirtualHost> </VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Log format config
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" common
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
# Header config
RemoteIPHeader X-Forwarded-For
RemoteIPInternalProxy 37.156.195.14
RemoteIPInternalProxy 37.156.195.19
RemoteIPInternalProxy 37.156.195.84
RemoteIPInternalProxy 37.156.195.92
#ErrorDocument 404 /404.html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined env=forwarded
SSLEngine On
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
<Directory /var/www/html/>
LimitRequestBody 0
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
config.php: | config.php: |
<?php <?php
$CONFIG = array ( $CONFIG = array (