RE: plain HTTP to an SSL-enabled server port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Strictly speaking you are right about not needing two virtual hosts. One virtual host would be sufficient e.g. for the SSL stuff. Although there may not be any technical reason that requires it, I personally like to do things with virtual hosts rather than at the server config level. I therefore suggested two VH without even thinking...

What I provided was the bare minimum to make it work for you. If you want to log to different log files, it's up to you to add the adequate CustomLog and ErrorLog directives to each of the virtual hosts. You may use a different log format for SSL in which you add information about the ciphersuite if required.

-ascs
 
-----Message d'origine-----
De : Thomas Antony [mailto:thomas@xxxxxxxxx] 
Envoyé : lundi 10 décembre 2007 12:30
À : users@xxxxxxxxxxxxxxxx
Objet : Re:  plain HTTP to an SSL-enabled server port

Hi,

This works.
Is there a technical reason why i need 2 virtual hosts instead of one?
Is it safe that both virtual hosts share the same log files?



>  You need to create 2 virtual hosts: one for port 80 where SSL is NOT enabled, and one on port 443 where SSL is enabled. You will also need two Listen directives: one for each of ports 80 and 443.
> 
> Listen *:80
> Listen *:443
> 
> <VirtualHost *:443>
> 
>    ServerName my.server.com:443   
> 
>    SSLCertificateFile /sslcerts/crt/my.server.com.crt
>    SSLCertificateKeyFile /sslcerts/key/my.server.com.key
>    SSLEngine on
> 
> </VirtualHost>                                  
> 
> <VirtualHost *:80>
> 
>    ServerName my.server.com:80   
> 
>    SSLEngine off
> 
> </VirtualHost>                                  

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux