canax/commons

View on GitHub
config/docker/website.conf

Summary

Maintainability
Test Coverage
Define site  website.se
Define mount /app

ServerAdmin admin@${site}
ServerName ${site}

<VirtualHost *:80>
    DocumentRoot ${mount}/htdocs
    ServerSignature Off

    Include ${mount}/config/apache/env.conf
    Include ${mount}/config/apache/redirect.conf
    Include ${mount}/config/apache/rewrite.conf

    <Directory />
        Options +Indexes
        Options +FollowSymLinks

        #Options +ExecCGI
        #AddHandler cgi-script .cgi

        AllowOverride None
        Require all granted
        Order allow,deny
        Allow from all
        Deny from env=spambot

        # Rewrite to frontcontroller
        #RewriteEngine on
        #RewriteCond %{REQUEST_FILENAME} !-f
        #RewriteCond %{REQUEST_FILENAME} !-d
        #RewriteRule .* index.php [NC,L]

        FallbackResource /index.php
    </Directory>

    <FilesMatch "\.(jpe?g|png|gif|js|css|svg|ttf|otf|eot|woff|woff2|ico)>
        ExpiresActive On
        ExpiresDefault "access plus 1 week"
    </FilesMatch>

    #LogLevel alert rewrite:trace6
    # tail -f error.log | fgrep '[rewrite:'

    ErrorLog  ${mount}/log/apache/error.log
    CustomLog ${mount}/log/apache/access.log combined
</VirtualHost>