httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "L.M.J" <linuxmasterj...@free.fr>
Subject Re: [users@httpd] Apache2 | One Virtualhost for 80 AND 443
Date Fri, 17 Dec 2010 21:12:04 GMT
Le Fri, 17 Dec 2010 15:50:31 +0100,
"King Holger (CI/AFP2)" <Holger.King@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


Mime
View raw message