Getting domain info on each hit.
am 16.11.2009 19:54:52 von Devrim Yasar
--Apple-Mail-1111-917618435
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii;
format=flowed;
delsp=yes
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),
$ServerAdmin = int(rand(100))."loko\@koko.com";
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 = julie@myperl.com
, 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-withi n-apache-virtualhost-containers
--Apple-Mail-1111-917618435
Content-Type: multipart/related;
type="text/html";
boundary=Apple-Mail-1112-917618436
--Apple-Mail-1112-917618436
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
charset=us-ascii
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =To demonstrate my case, I placed =
random numbers on ServerAdmin directive (just to =
test),
<Perl>
$ServerAdmin =3D =
int(rand(100))."loko\@koko.com";
</Perl>
id=3D"9b47af47-4d8d-4431-a4de-97cb4d33d07e" height=3D"81" width=3D"385" =
apple-width=3D"yes" apple-height=3D"yes" =
src=3D"cid:0D0F9C7C-E9FC-474E-898E-4D5891B72D86@nyc.rr.com">
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:
size=3D"4">
">
style=3D"font-size: 15px; ">if
href=3D"http://julie.myperl.com/">julie.myperl.com is the =
requested domain, then $ServerAdmin =3D
href=3D"mailto:julie@myperl.com">julie@myperl.com, 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,
type=3D"cite">
href=3D"http://httpd.apache.org/docs/1.3/mod/mod_vhost_alias .html">http://=
httpd.apache.org/docs/1.3/mod/mod_vhost_alias.html
<=
div>
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.
href=3D"http://serverfault.com/questions/84582/using-variabl es-within-apac=
he-virtualhost-containers">http://serverfault.com/questions/ 84582/using-va=
riables-within-apache-virtualhost-containers
=
Re: Getting domain info on each hit.
am 16.11.2009 20:04:05 von gozer
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig60D939A8722B43777393E77B
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On 09-11-16 13:54 , Devrim Yasar wrote:
> Hi,
>=20
> We want to retrieve URL and use it inside our vhosts, realtime.
>=20
> To demonstrate my case, I placed random numbers on ServerAdmin directiv=
e
> (just to test),
>=20
>
> $ServerAdmin =3D int(rand(100))."loko\@koko.com";
>
>=20
>=20
>=20
>=20
> As you may know, this random number is assigned only when you restart
> the server, and never changes until another restart.
>=20
> This is what we want:=20
>=20
> if julie.myperl.com is the requested domain,=
> then $ServerAdmin =3D julie@myperl.com , that =
is,
> realtime.
>=20
> Hopefully there is a solution, since this will help us remove thousands=
> of config files, and save us from thousands of apache reloads.
Something like this is probably what you are looking like
$r->server->server_hostname;
$r->server->server_admin('julie@myperl.com');
Read from here:
n_>
--=20
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
--------------enig60D939A8722B43777393E77B
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iD8DBQFLAaIuyzKhB4jDpaURAoDdAKCoA6FfO2JBR3TYunSatZpTN77hJQCe PVml
qC+qJjgsfQs/LQob+wsCVP4=
=md7P
-----END PGP SIGNATURE-----
--------------enig60D939A8722B43777393E77B--