You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "King Holger (CI/AFP2)" <Ho...@de.bosch.com> on 2010/12/17 15:50:31 UTC

[users@httpd] Apache2 | One Virtualhost for 80 AND 443

Hi Apache2 group,

is there a possibility to use JUST one VirtualHost for accessing it via HTTP and HTTPS.
To my understanding, this is not possible because "SSLEngine on" just forces the HTTP-
access to work just with HTTPS:

NameVirtualHost *:80
NameVirtualHost *:443

<VirtualHost *:80 *:443>
   ...
   SSLEngine on
   ...
</VirtualHost>

Any hints and tipps are highly appreciated.

Mit freundlichen Grüßen / Best regards,
Holger King

Robert Bosch GmbH
inside.WCMS  (CI/AFP2)
Postfach 30 02 20
70442 Stuttgart
GERMANY
www.bosch.com<http://www.bosch.com>

Tel. 0711/811-59112
Holger.King@de.bosch.com<ma...@de.bosch.com>

Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000;
Aufsichtsratsvorsitzender: Hermann Scholl; Geschäftsführung: Franz Fehrenbach, Siegfried Dais;
Bernd Bohr, Rudolf Colm, Volkmar Denner, Wolfgang Malchow, Peter Marks,
Peter Tyroller; Stefan Asenkerschbaumer, Uwe Raschke, Wolf-Henning Scheider




[users@httpd] Re: Apache2 | One Virtualhost for 80 AND 443

Posted by Andrew Schulman <an...@alumni.utexas.net>.
> I'm using a nasty trick to have similar behavior.

I wouldn't call that a nasty trick.  More like an intelligent
factorization.  It's the right way to do what Holger wants to do.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache2 | One Virtualhost for 80 AND 443

Posted by "L.M.J" <li...@free.fr>.
Le Fri, 17 Dec 2010 15:50:31 +0100,
"King Holger (CI/AFP2)" <Ho...@de.bosch.com> a écrit :

> Hi Apache2 group,
> 
> is there a possibility to use JUST one VirtualHost for accessing it via HTTP and HTTPS.
> To my understanding, this is not possible because "SSLEngine on" just forces the HTTP-
> access to work just with HTTPS:
> 
> NameVirtualHost *:80
> NameVirtualHost *:443
> 
> <VirtualHost *:80 *:443>
>    ...
>    SSLEngine on
>    ...
> </VirtualHost>
> 
> Any hints and tipps are highly appreciated.

I'm using a nasty trick to have similar behavior. I'm making 3 files :
1)  myhostname_http :
     NameVirtualHost *:80
     <VirtualHost *:80>
     ...
     Include myhostname_commun
     ...
     </VirtualHost>


2)  myhostname_https :
     NameVirtualHost *:443
     <VirtualHost *:443>
     ...
     SSLEngine on
     Include myhostname_commun
     ...
     </VirtualHost>


3)  myhostname_commun :
     	...
        DocumentRoot /var/www
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
     	...

-- 
 LMJ
 "May the source be with you my young padawan"
 http://sites.google.com/site/imatruelinuxmasterjedi/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache2 | One Virtualhost for 80 AND 443

Posted by Tom Evans <te...@googlemail.com>.
On Sat, Dec 18, 2010 at 11:23 PM, J. Greenlees
<li...@jaqui-greenlees.net> wrote:
> Eric Covener wrote:
>> On Fri, Dec 17, 2010 at 9:50 AM, King Holger (CI/AFP2)
>> <Ho...@de.bosch.com> wrote:
>>> Hi Apache2 group,
>>>
>>> is there a possibility to use JUST one VirtualHost for accessing it via HTTP
>>> and HTTPS.
>>
>> No.
>>
> not even if it is ipbased vhost rather than name based?
> ipbase vhost being the better option for ssl anyways, since ssl
> certificates are served based on ip address not server name.
>

Still no.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache2 | One Virtualhost for 80 AND 443

Posted by "J. Greenlees" <li...@jaqui-greenlees.net>.
Eric Covener wrote:
> On Fri, Dec 17, 2010 at 9:50 AM, King Holger (CI/AFP2)
> <Ho...@de.bosch.com> wrote:
>> Hi Apache2 group,
>>
>> is there a possibility to use JUST one VirtualHost for accessing it via HTTP
>> and HTTPS.
> 
> No.
> 
not even if it is ipbased vhost rather than name based?
ipbase vhost being the better option for ssl anyways, since ssl
certificates are served based on ip address not server name.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache2 | One Virtualhost for 80 AND 443

Posted by Eric Covener <co...@gmail.com>.
On Fri, Dec 17, 2010 at 9:50 AM, King Holger (CI/AFP2)
<Ho...@de.bosch.com> wrote:
> Hi Apache2 group,
>
> is there a possibility to use JUST one VirtualHost for accessing it via HTTP
> and HTTPS.

No.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org