Right, here's my first attempt...
#------------------------------------------------------------
# Information bay directories
#------------------------------------------------------------
<snip>
my $dynamicContent = $properties{'CgiBin'} || "disabled";
$OUT .= "\n";
$OUT .= "#------------------------------------------------------------\n";
$OUT .= "# $key ibay directories ($properties{'Name'})\n";
$OUT .= "#------------------------------------------------------------\n";
$OUT .= "\n";
if ($key eq 'Primary')
{
$OUT .= "#------------------------------------------------------------\n";
$OUT .= "# Primary ibay modified to allow Bugzilla CGIs to run in html\n";
$OUT .= "# directory. \n";
$OUT .= "# See /etc/e-smith/templates-custom/etc/httpd/conf/-\n";
$OUT .= "# httpd.conf/90e-smithAccess40ibays\n";
$OUT .= "#------------------------------------------------------------\n";
$OUT .= "\n";
$OUT .= "<Directory /home/e-smith/files/ibays/$key/html>\n";
$OUT .= " AddHandler cgi-script .cgi\n";
$OUT .= " Options Indexes\n";
$OUT .= " Options +Includes +ExecCGI\n";
$OUT .= " DirectoryIndex index.cgi\n";
$OUT .= " AllowOverride Limit\n";
$OUT .= " order deny,allow\n";
$OUT .= " deny from all\n";
$OUT .= " allow from all\n";
$OUT .= "</Directory>\n";
}
else
{
$OUT .= "<Directory /home/e-smith/files/ibays/$key/html>\n";
$OUT .= " Options Indexes\n";
if ($dynamicContent eq 'enabled')
{
$OUT .= " Options +Includes\n";
}
else
{
$OUT .= " <FilesMatch \"\\.(php|php3|phtml)\$\">\n";
$OUT .= " order deny,allow\n";
$OUT .= " Deny from all\n";
$OUT .= " </FilesMatch>\n";
$OUT .= " Options +IncludesNOEXEC\n";
}
$OUT .= " AllowOverride None\n";
$OUT .= " order deny,allow\n";
$OUT .= " deny from all\n";
$OUT .= " allow from $allow\n";
if ($pass)
{
$OUT .= " AuthName \"$properties{'Name'}\"\n";
$OUT .= " AuthType Basic\n";
$OUT .= " AuthExternal pwauth\n";
$OUT .= " require user $key\n";
$OUT .= " Satisfy $satisfy\n";
}
$OUT .= "</Directory>\n";
<snipped to end>
This works. However, Have I potentially messed up my server?
Are any other of the .../Primary/html directory properties modified by actions in the web interface?
All help / comments much appreciated.
Cheers
Norrie
8o)