Q:

Listening for https in apache

How do I set up listening for https requests in apache2?
One of my virtual hosts has a form of:
    <VirtualHost *:80>
        ServerName central
        DocumentRoot /var/www4
        ...
    </VirtualHost>

How should I modify this extract of my virtual-host-config to enable apache to listen to https? I need it because my website is supposed to send https POST requests at login. I've tried changing the opening tag for:
    <VirtualHost *:80 *:443>

..., but it didn't work. Any ideas?

A:

try this
Listen 10.1.2.3:443
Listen 10.1.2.3:80

NameVirtualHost 10.1.2.3:443
<VirtualHost 10.1.2.3:443>
  ServerName some.name.com
  SSLEngine On
  SSLCertificateFile /path/to/file.crt
  SSLCertificateKeyFile /path/to/file.key
  DocumentRoot /var/www4/ssl
#   ....
</VirtualHost> 

<VirtualHost 10.1.2.3:80>
  DocumentRoot /var/www4/nossl/
#   ....
</VirtualHost> 

