Getting domain info on each hit.

Devrim Yasar <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
Hi,

We want to retrieve URL and use it inside our vhosts, realtime.

To demonstrate my case, I placed random numbers on ServerAdmin  
directive (just to test),

<Perl>
$ServerAdmin = int(rand(100))."loko\@koko.com";
</Perl>




As you may know, this random number is assigned only when you restart  
the server, and never changes until another restart.

This is what we want:

if julie.myperl.com is the requested domain, then $ServerAdmin = [email protected] 
, that is, realtime.

Hopefully there is a solution, since this will help us remove  
thousands of config files, and save us from thousands of apache reloads.

Thanks,
Devrim

here is kind of similar situation and solution,

> http://httpd.apache.org/docs/1.3/mod/mod_vhost_alias.html


and here is why ask this question,
we have built an API in which subdomains signify unix account names,
so variable part of {$user}.kodingen.com must be used within vhost conf.
http://serverfault.com/questions/84582/using-variables-within-apache-virtualhost-containers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.