Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C7AB7102A1 for ; Tue, 24 Sep 2013 12:38:25 +0000 (UTC) Received: (qmail 91620 invoked by uid 500); 24 Sep 2013 12:35:00 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 91540 invoked by uid 500); 24 Sep 2013 12:34:58 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 91226 invoked by uid 99); 24 Sep 2013 12:34:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Sep 2013 12:34:52 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [195.202.44.142] (HELO mail.sitepark.com) (195.202.44.142) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 24 Sep 2013 12:34:46 +0000 Received: (qmail 23473 invoked from network); 24 Sep 2013 12:34:33 -0000 Received: from unknown (HELO kerberos.sitepark.com) (grover@kerberos.sitepark.com) by mail.sitepark.com with SMTP; 24 Sep 2013 12:34:33 -0000 Date: Tue, 24 Sep 2013 14:34:23 +0200 From: Christoph =?ISO-8859-1?Q?Gr=F6ver?= To: modules-dev@httpd.apache.org Subject: Re: How to determine the "right" vhost in name based vhosting Message-ID: <20130924143423.75f2330b@aeshna.sitepark.local> In-Reply-To: <52417C84.8080404@gmail.com> References: <20130919163919.4a7c2b27@aeshna.sitepark.local> <523B4C01.8050009@gmail.com> <20130924113831.053b561c@aeshna.sitepark.local> <524161F3.5050209@gmail.com> <20130924130440.603111a4@aeshna.sitepark.local> <52417C84.8080404@gmail.com> Organization: Sitepark GmbH X-Mailer: Claws Mail 3.7.5 (GTK+ 2.20.1; x86_64-mandriva-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Loop-Detection: 1 X-Virus-Checked: Checked by ClamAV on apache.org Hello Sorin, Thank you very much. I finally found out the course of the strange results I am getting. I used the request_rec to get the conn_rec. In this connection record there's a field called base_server, which I used as the source for the=20 server_hostname. request_rec *r; conn_rec *c; server_rec *server; c =3D r->connection; server =3D c->base_server; My misunderstanding was that this leads to the main vhost I am using. But it actually leads to the default server of the current ip:port combination. Now I use: server =3D r->server; This gives the expected result. Everything is fine now ;-). I can't tell you why I used the more complicated way to retrieve a server_rec. Probably just used some example code from somewhere. In the beginning everything seemed alright since we always had just one vhost under one IP. The problem showed up when we had a second vhost running. Another misunderstanding solved now. Thank you for your time (and patience). With kind regards .. --=20 Sitepark Gesellschaft f=FCr Informationsmanagement mbH Rothenburg 14-16, 48143 M=FCnster Telefon: +49 251 482655-0, Telefax: +49 251 482655-55 http://www.sitepark.com http://www.facebook.com/sitepark Gesch=E4ftsf=FChrer: Thorsten Liebold Amtsgericht M=FCnster, HRB 5017