Re: Apache frage

From: Bernd Walter <ticso(at)cicely12.cicely.de>
Date: Tue, 7 Oct 2003 14:53:13 +0200

On Tue, Oct 07, 2003 at 02:05:01PM +0200, Widmer Hannes wrote:
> <?php
>
> //phpinfo();
>
> if ($_SERVER["SERVER_PORT"] == "443") {
> switch ($_SERVER["HTTP_HOST"]) {
> case "webmail.domain1.ch":
> header("Location: https://webmail.domain1.ch/domain1_webmail");
> break;
> case "webmail.domain2.ch":
> header("Location: https://webmail.domain2.ch/domain2_webmail");
> break;
> default:
> print "Action not allowed !!!";
> }
> } else {
> print "Only https is accepted!!";
> }
>
> ?>

Das kannst du mit normalen vhosts mit dem Apache auch ohne Flickwerk.
Die funktionieren nämlich mit SSL ebenso gut.
Das eigendliche Problem mit SSL hast du damit aber nicht gelöst, da
der Server bei einem Connct immer noch nicht weiß welches Zertifikat
es dem Client übermitteln soll.
Du kannst es drehen und wenden wie du willst - der Server muss noch
vor dem ersten HTTP Request wissen welche Domain der Client haben
will.

-- 
B.Walter                   BWCT                http://www.bwct.de
ticso(at)bwct.de                                  info(at)bwct.de
To Unsubscribe: send mail to majordomo.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Tue 07 Oct 2003 - 14:53:54 CEST

search this site