#
# Bareos WebUI Apache configuration file
#

# Environment Variable for Application Debugging
# Set to "development" to turn on debugging mode or
# "production" to turn off debugging mode.
<IfModule env_module>
    SetEnv "APPLICATION_ENV" "production"
</IfModule>

Alias /bareos-webui  @WEBUI_DIR@/public

<Directory @WEBUI_DIR@/public>
    Options FollowSymLinks
    AllowOverride None

    # Following module checks are only done to support
    # Apache 2.2,
    # Apache 2.4 with mod_access_compat and
    # Apache 2.4 without mod_access_compat
    # in the same configuration file.
    # Feel free to adapt it to your needs.

    # Apache 2.2
    <IfModule !mod_authz_core.c>
            Order deny,allow
            Allow from all
    </IfModule>

    # Apache 2.4
    <IfModule mod_authz_core.c>
            <IfModule mod_access_compat.c>
                Order deny,allow
            </IfModule>
            Require all granted
    </IfModule>

    <IfModule mod_rewrite.c>
            RewriteEngine on
            RewriteBase /bareos-webui
            RewriteCond %{REQUEST_FILENAME} -s [OR]
            RewriteCond %{REQUEST_FILENAME} -l [OR]
            RewriteCond %{REQUEST_FILENAME} -d
            RewriteRule ^.*$ - [NC,L]
            RewriteRule ^.*$ index.php [NC,L]
    </IfModule>

    <IfModule mod_php5.c>
            php_flag magic_quotes_gpc off
            php_flag register_globals off
    </IfModule>
</Directory>
