I've come across an oddity in configuring Apache through Perl sections.

If I have a local as follows,

my %access = (
    Order => 'deny,allow',
    Deny => 'from all',
    Allow => [['from', '1.2.3.0/24'],
              ['from', '192.168.1.0/24']],
);    

then set up locations (or directorys) as follows

%Location = (
    '/server-status' => {
        SetHandler => 'server-status',
        %access,
    },
    '/server-info' => {
        SetHandler => 'server-info',
        %access,
    },
);

Then only one of the locations will let me access it. 

http://servername/server-status will let me in,
http://servername/server-info won't.

The problem seems to be with the shared reference: changing the 'Allow'
line above to
Allow => 'from all' works - though without the desired restriction of
course, as does 
changing the code above to the following.

%Location = (
    '/server-status' => {
        SetHandler => 'server-status',
        %access,
        Allow => [['from', '1.2.3.0/24'],
                  ['from', '192.168.1.0/24']],
    },
    '/server-info' => {
        SetHandler => 'server-info',
        %access,
        Allow => [['from', '1.2.3.0/24'],
                  ['from', '192.168.1.0/24']],
    },
);

Is this a bug, a stupid-user problem, or something else?

I'm using Apache/1.3.20, mod_perl/1.25 and 1.26, and Perl v5.6.1


Steve

-- 
Steve Piner
Web Applications Developer
Marketview Limited
http://www.marketview.co.nz

Reply via email to