{
    my $db       = esmith::ConfigDB->open_ro("WebShare")
    or return "# webshare disabled\n";

    my @webshare = $db->get_all_by_prop( type => 'WebShare' );

    foreach $webshare (@webshare) {
        my $key = $webshare->key;
        $OUT .= "# webshare\/$key\n";
        $OUT .= "Alias \/webshare\/$key \/opt\/webshare\/$key\n";
        $OUT .= "<Directory \/opt\/webshare\/$key>\n";
        $OUT .= "    SSLRequireSSL\n";
        $OUT .= "    Options +Indexes\n";
        $OUT .= "    AllowOverride None\n";
        $OUT .= "    AuthName \"Restricted $key access only\"\n";
        $OUT .= "    AuthType Basic\n";
        $OUT .= "    AuthUserFile \/home\/e-smith\/db\/webshare\/htpasswd.$key\n";
        $OUT .= "    Require valid-user\n";
        $OUT .= "    AddType application\/x-httpd-php \.php \.php3\n";
        $OUT .= "    <FilesMatch .php>\n";
        $OUT .= '        SetHandler "proxy:unix:/var/run/php-fpm/php.sock|fcgi://localhost"'."\n";
        $OUT .= "    </FilesMatch>\n";
        $OUT .= "<\/Directory>\n";
        $OUT .= "\n";
    }
}
