ServerRoot "{{ serverroot }}"

Listen 80
Include conf.modules.d/*.conf

User apache
Group apache

ServerAdmin {{ master.mail }}

<Directory />
    AllowOverride none
    Require all denied
</Directory>

DocumentRoot "{{ app.webdir }}/html"

<Directory "{{ app.webdir }}">
    AllowOverride None
    Require all granted
</Directory>

<Directory "{{ app.webdir }}/html">
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

<Directory "{{ app.webdir }}/cgi-bin">
    AllowOverride All
    Options Indexes FollowSymLinks
    Require all granted
</Directory>

AccessFileName .htaccess

<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>

<Files ".ht*">
    Require all denied
</Files>

<Files "agent.sh">
    Require all granted
</Files>

ErrorLog "{{ app.logdir }}/web_error_log"

LogLevel warn

<IfModule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    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 "{{ app.logdir }}/web_access_log" combined
</IfModule>

<IfModule alias_module>
    ScriptAlias /cgi-bin/ "{{ app.webdir }}/cgi-bin/"
</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 conf.d/*.conf

ServerName {{ ssh_ip }}:80
