Really strange access behaviours.... Only for the strong stomaches!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 peterm\@my.site",
                                "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)=@_;
        my $sm = "/usr/sbin/sendmail -t";
        open SM, "|$sm";
        print SM <<EOF;
To: pmilanese\@my.site
From: Web Farm
Reply-to: peterm\@my.site
Subject: $subject

$content



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux