#------------------------------------------------------------
# e-smith files shared by manager and other control packages
#------------------------------------------------------------

<Directory "/etc/e-smith/web/common/cgi-bin">
    AllowOverride None
    Options ExecCGI
    <RequireAll>
        Require ip { $localAccess }
    </RequireAll>
</Directory>

<Directory "/etc/e-smith/web/common">
    Options Includes
    AllowOverride None
    Require all granted
    <FilesMatch ".*\.tmpl">
        Require all denied
    </FilesMatch>
</Directory>

<Directory "/etc/e-smith/web/panels/manager/common">
    Options Includes FollowSymLinks
    AllowOverride None
    AuthType basic
    TKTAuthLoginURL /server-common/cgi-bin/login
{
	my $ManagerTimeout = ${'httpd-admin'}{ManagerTimeout} || "30m";
	$OUT = "    TKTAuthTimeout $ManagerTimeout\n";
        my $Cookie = ${'httpd-admin'}{Cookie} || "disabled";
        $OUT .= "    TKTAuthCookieExpires $ManagerTimeout\n" if "$Cookie" eq "enabled";
	my $ManagerTimeoutReset = ${'httpd-admin'}{ManagerTimeoutReset} || "0.66";
	$OUT .= "    TKTAuthTimeoutRefresh $ManagerTimeoutReset\n";
}
    TKTAuthUnauthURL /server-common/cgi-bin/logout
    <RequireAll>
        require valid-user
        Require all granted
    </RequireAll>
</Directory>

