Matt Sergeant wrote:
> OK then, try this:
>
> for ($s = Apache->server; $s; $s = $s->next) {
> my ($server, $port) = ($s->server_hostname, $s->port);
> $r->print('server: ', $server, "\n");
> $r->print('port: ', $port, "\n");
>
> my $subreq = $r->lookup_uri("http://$server:$port/");
> $r->print('variable value: ', $subreq->dir_config('SomePerlVariable'), "\n");
> }
Ah. But what if the server is running SSL - or what if the root page is
protected by basic or some other such form of auth or access control? I
can work up some elaborate setup in which a request from the server's own
IP address will pass all these checks. Or I can push auth modules that
return OK on non-main requests.
But this is pretty scary--and hard to maintain as servers change IP ad-
dresses or DNS names shift (yes, we can handle the address/name shifts
via <Perl> sections, but this seems overkill for what [I had thought]
would be a simple problem that should have been an easy solve).
(As you said, one would think that dir_config [called on a server object]
should have done the trick.)
--
Richard Goerwitz [EMAIL PROTECTED]