https://bugs.contribs.org/show_bug.cgi?id=11178

--- Comment #5 from Brian Read <[email protected]> ---
Contents of /etc/templates/etc/httpd/conf/httpd.conf/unjunkmgr:

{
    use esmith::NetworksDB;
    use esmith::ConfigDB;

    my $ndb = esmith::NetworksDB->open_ro();

    $localAccess = $ndb->local_access_spec();
    $localAccess =~ s#/255\.255\.255\.255##g;

        my $dbh = esmith::ConfigDB->open() || die "Unable to open configuration
dbase.";
        my %sa_conf = $dbh->get('unjunkmgr')->props;

        while (my ($parameter,$value) = each(%sa_conf)) {
          if ($parameter eq 'LocalOnly') {
           $local = $value;
          }
          if ($parameter eq 'enabled') {
           $enabled = $value;
          }

        }

        $OUT = "";
        if (not (uc($enabled) eq 'YES')) {
         return;
        }
        $OUT .= "# This is the location of the UnJunk web interface\n";

        $OUT .= "AddHandler cgi-script .pl\n";
        $OUT .= "Alias /unjunkmgr /usr/local/unjunkmgr\n";

        $OUT .= "<Directory /usr/local/unjunkmgr>\n";

        #$OUT .= "\tAddType application/x-httpd-php .php\n";
        #$OUT .= "\tOptions FollowSymLinks\n";
        #$OUT .= "\tOptions +ExecCGI\n";

        $OUT .= "\tOptions +FollowSymLinks\n";
        $OUT .= "\tAllowOverride All\n";
        $OUT .= "\t<FilesMatch \.php\$\>\n";
        $OUT .= "\t\torder deny,allow\n";
        $OUT .= "\t\tSetHandler
\"proxy:unix:/var/run/php-fpm/php74.sock|fcgi://localhost\"\n";
        $OUT .= "\t</FilesMatch>\n";


        $OUT .= "\torder deny,allow\n";
        $OUT .= "\tdeny from all\n";

        if (uc($local) eq 'YES') {
          $OUT .= "\tallow from $localAccess\n";
        } else {
          $OUT .= "\tallow from all\n";
        }

        $OUT .= "</Directory>\n";
}

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
_______________________________________________
Mail for each SME Contribs bug report
To unsubscribe, e-mail [email protected]
Searchable archive at https://lists.contribs.org/mailman/public/contribteam/

Reply via email to