# Whenever there is a need to debug the rewrite rules here then uncomment below # LogLevel alert rewrite:trace6 AddType text/plain .log AddType text/plain .sh AddType text/plain .yaml AddType text/plain .yml Options Indexes SymLinksIfOwnerMatch Require all granted IndexOptions FancyIndexing HTMLTable NameWidth=* SuppressDescription Header set Access-Control-Allow-Origin "*" RewriteEngine On # Serve gzipped static file requested w/o the .gz extention RewriteCond %{HTTP:Accept-Encoding} gzip RewriteCond /var/www/html/%{REQUEST_URI}.gz -f RewriteRule ^(.*)$ $1.gz [L,PT] ForceType text/plain AddEncoding x-gzip gz ForceType text/json AddDefaultCharset UTF-8 AddEncoding x-gzip gz ForceType text/html AddDefaultCharset UTF-8 AddEncoding x-gzip gz ForceType text/css AddDefaultCharset UTF-8 AddEncoding x-gzip gz ForceType text/javascript AddDefaultCharset UTF-8 AddEncoding x-gzip gz ForceType application/x-font-ttf AddEncoding x-gzip gz ForceType image/svg+xml AddEncoding x-gzip gz ForceType application/json AddEncoding x-gzip gz ForceType text/plain AddDefaultCharset UTF-8 AddEncoding x-gzip gz ForceType application/pdf AddEncoding x-gzip gz # mod_mime_magic is sometimes passing css files as asm sources # e.g css files generated by coverage reports ForceType text/css