perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elizabeth Mattijsen <>
Subject Re: [MP2] Setting up seperate logs for virtual hosts from a database
Date Mon, 26 Jan 2004 21:27:12 GMT
At 11:42 -0800 1/26/04, Stas Bekman wrote:
>Elizabeth Mattijsen wrote:
>>Well, the error log wouldn't be such a problem.  There is an 
>>advantage to getting all of the errors in one place.  But the 
>>access logs, now that would be nice...  ;-)
>At the moment you can try to traverse the servers chaing using the 
>following idiom:
>  my $s = Apache->server;
>  for (;$s;$s=$s->next) {
>    $s->add_config([....]);
>  }
>that gives you an access to each of the vhosts (that were configured 
>so far), so you probably want to run this once you've added all your 
>vhosts. Also you will have to figure out who is who, with some extra 
>calls on $s.

But that's just it.  I _don't_ have any vhosts in the config.

What I basically have is a single database that is used to build 30+ 
different websites (mostly realtime, with some caching), each giving 
a different view on the information in the database.  Some have all, 
most others are limited in their view of the database.  And of 
course, there is one such website that's actually the CMS of the 

On server startup, the database is read and and the hostnames of 30+ 
different sites come out (all winding up on the same IP-address). 
Nothing about that in the config file.

Now, I really wouldn't need virtual hosts except for the fact that I 
want to have (at least) seperate access logs for each of these 30+ 
different sites.  The only way I figured I'd be able to do that, was 
by creating basically dummy virtual hosts of which the only 
information in there would be the specification of the seperate 
access (and possibly error) log.

>But I think we should figure out how to fix it to do the right 
>thing, stay tuned at the dev list. See:

Can I add vhosts with $s->add_config?  Something like:

   $s->add_config( "VirtualHost" );
   $s->add_config( "VirtualHost" );

  and then do the loop with $s->next?  Or am I now stretching the API 
beyond to what was intended?


Reporting bugs:
Mail list info:
List etiquette:

View raw message