Alias /amtc-web /usr/share/amtc-web

<Directory /usr/share/amtc-web>
  Order allow,deny
  Allow from all
  Options SymLinksIfOwnerMatch
  AllowOverride all

  <FilesMatch "\.html\.gz$">
    ForceType text/html
    Header set Content-Encoding: gzip
  </FilesMatch>

  <FilesMatch "\.js\.gz$">
    ForceType text/javascript
    Header set Content-Encoding: gzip
  </FilesMatch>

  <FilesMatch "\.css\.gz$">
    ForceType text/css
    Header set Content-Encoding: gzip
  </FilesMatch>

  RewriteEngine On
  RewriteBase /amtc-web
  RewriteCond %{HTTP:accept-encoding} gzip
  RewriteCond %{REQUEST_FILENAME} !\.gz$
  ReWriteCond %{REQUEST_FILENAME}.gz -f
  RewriteRule ^(/.*)(.+\.js|.+\.css|.+\.html)$ $1$2.gz [L]
</Directory> 

<Directory /usr/share/amtc-web/basic-auth>
  AuthUserFile /etc/amtc-web/.htpasswd
  AuthName "amtc-web loopback basic auth"
  AuthType Basic
  require valid-user
</Directory> 

<Directory /usr/share/amtc-web/data>
  Order allow,deny
  Deny from all
</Directory> 

<Directory /usr/share/amtc-web/config>
  Order allow,deny
  Deny from all
</Directory> 
