{
my $access = $fluxbb{'access'} || 'private';
my $allow = ($access eq 'public')?'all':"$localAccess $externalSSLAccess";
my $authtype = $fluxbb{'Authentication'} || '';
my $alias = (($fluxbb{'AliasOnPrimary'} || 'enabled') eq 'enabled') ?
    'Alias /fluxbb /usr/share/fluxbb' : '';
my $auth = '';
if ($authtype eq 'http'){
    $auth =<<'EOF';
        AuthName "fluxbb"
        AuthType Basic
        AuthExternal pwauth
        Require valid-user
EOF
}
if ($fluxbb{'status'} eq 'enabled'){

$OUT .=<<"END"

# fluxbb Configuration
$alias

<Directory  /usr/share/fluxbb>
    Options +FollowSymLinks
    AllowOverride Limit
    AddType application/x-httpd-php .php
    php_admin_value open_basedir /usr/share/fluxbb:/var/cache/fluxbb:/var/lib/fluxbb:/tmp
    php_admin_flag file_uploads On
    php_admin_flag magic_quotes Off
    php_admin_flag magic_quotes_gpc Off
    php_admin_value memory_limit 100M
    php_admin_flag output_buffering Off
    order deny,allow
    deny from all
    allow from $allow
    <Files sso.php>
        SSLRequireSSL on
$auth
    </Files>
</Directory>
<Directory /usr/share/fluxbb/include>
    Deny from all
</Directory>
<Directory /usr/share/fluxbb/lang>
    Deny from all
</Directory>
END
}
else{
    $OUT .= "# fluxbb is disabled\n";
}
}
