ansible-roles/roles/httpd_common/templates/httpd.conf.j2
2021-12-01 19:13:34 +01:00

56 lines
1.7 KiB
Django/Jinja

ServerRoot "/etc/httpd"
{% for port in httpd_ports %}
Listen {{ port }} http
{% endfor %}
Include ansible_conf.modules.d/*.conf
User {{ httpd_user }}
Group {{ httpd_group }}
ServerAdmin root@{{ inventory_hostname }}
ServerName {{ inventory_hostname }}
ServerTokens Prod
ProxyTimeout {{ httpd_proxy_timeout }}
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/var/www/html/default"
<Directory "/var/www/html/default">
AllowOverride None
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
<Files ".ht*">
Require all denied
</Files>
ErrorLog "logs/error_log"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" scheme=\"%{HTTP}e\"" combined
LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" scheme=\"%{HTTP}e\"" combined_virtual
LogFormat "%V %{X-Forwarded-For}i %l %{Auth-User}i %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" scheme=\"%{HTTP}e\"" combined_virtual_backend
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "logs/access_log" {{ httpd_log_format | default('combined_virtual') }}
</IfModule>
<IfModule mime_module>
TypesConfig /etc/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>
AddDefaultCharset UTF-8
<IfModule mime_magic_module>
MIMEMagicFile conf/magic
</IfModule>
EnableSendfile on
IncludeOptional ansible_conf.d/*.conf
IncludeOptional custom_conf.d/*.conf