Re: How to get virtualhost info in mod_perl?
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig865E75BD98F751D97908C3FD
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Adam Prime x443 wrote:[color=blue]
> $r->server->server_hostname()?[/color]
That gets you the canonical server name (i.e. what's in ServerName)
If you are interested in knowing what hostname was requested from the cli=
ent
(i.e [url]http://www.example.com[/url] vs [url]http://example.com[/url]), look at the 'Host:' h=
eader
$r->headers_in->{Host}
[color=blue]
> -----Original Message-----
> From: LUKE [mailto:luke@tc.program.com.tw]=20
> Sent: Thursday, October 26, 2006 11:16 AM
> To: [email]modperl@perl.apache.org[/email]
> Subject: How to get virtualhost info in mod_perl?
>=20
> The [url]http://rd-program.blogspot.com[/url] and [url]http://se-program.blogspot.com[/url] =[/color]
=20[color=blue]
> have the same ip address (72.14.207.191).How can i know the browser
> connect=20
> to apache server(in mod_perl) via which hostname?[/color]
-------------------------------------------------------------------------=
-------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 8=
8C3A5A5
[url]http://gozer.ectoplasm.org/[/url] F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 8=
8C3A5A5
--------------enig865E75BD98F751D97908C3FD
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.5 (GNU/Linux)
Comment: Using GnuPG with Fedora - [url]http://enigmail.mozdev.org[/url]
iD8DBQFFQQbuyzKhB4jDpaURA+OlAKCfUnXrNU5HcMmgwklRpzl5B0RLCACfTUJn
2mViNBpTFrawmYqxxsFvIcI=
=eqRm
-----END PGP SIGNATURE-----
--------------enig865E75BD98F751D97908C3FD--