Hi folks...

  I have a bit of a mod_perl config for my vhosts at this point. I'll post the 
relevant snip below. 
I am having a strange time figuring out why one site in this excerpt (which is 
not the first one loaded) has no 
access issues, but all of the others (vhosts) have 403's being bounced back. It 
is not permissions related,
nor is it SELINUX. I'm sure it's something silly, I just can't pinpoint it. I'm 
getting clean 403's 
on a simple html page though. It's the same site that works every time, which 
makes it look like
permissioning, but I've opened all of them up to no avail.
 Can someone review below please? Hopefully it's decent reading...

if ($env eq "dev" || $env eq "predev"){
        my $cnt = 0;
        my @usrs=`find /home/ -maxdepth 1 -mindepth 1 `;
        foreach $usr (@usrs){
                my ($vhost,$droot);
                chomp $usr;
                $vhost=basename($usr) . ".farm.my.site";
                $droot=$usr . "/www";
                if (-d ($droot)){
                        $s->add_config( ["<VirtualHost *:80>",
                                "ServerName $vhost",
                                "ServerAdmin [EMAIL PROTECTED]",
                                "DocumentRoot \"$droot\"",
                                "<Directory />",
                                "Options ExecCGI Indexes FollowSymLinks",
                                "Order allow,deny",
                                "Allow from all",
                                "</Directory>",
                                "ErrorLog \"|$cronolog 
/var/apache/logs/error/$vhost/%Y-%m-%d.error.log\"",
                                "CustomLog \"|$cronolog 
/var/apache/logs/access/$vhost/%Y-%m-%d.access.log\" combinedio",
                                "</VirtualHost>"
                        ]);
                        my $test=gethostbyname($vhost);
                        unless ($test){
                                my $subject="**Attention** DNS Entry Needed";
                                my $content="\nPlease create a CNAME 
record:\n\n\t $vhost -> dev01.farm.my.site";
                                smail($subject,$content);
                                }
                        }
                }
        }


sub smail {
        my ($subject,$content)[EMAIL PROTECTED];
        my $sm = "/usr/sbin/sendmail -t";
        open SM, "|$sm";
        print SM <<EOF;
To: [EMAIL PROTECTED]
From: Web Farm
Reply-to: [EMAIL PROTECTED]
Subject: $subject

$content


      

Reply via email to