I followed this site to get the basics up and running, in particular how to generate self-signed certificates: Raible’s Wiki: ApacheSSL
The actual configuration of my Virtual Hosts in the httpd.conf file was more trial and error. There is plenty of info about not mixing name and ip based Vitual Hosts, but I couldn’t find a good working example. It turns out that this configuration works fine:
<code>
NameVirtualHost x.x.x.x:80
#Use SSL for this Virtual Host
<VirtualHost x.x.x.x:443>
SSLEngine On
SSLCertificateFile /path_to/server.crt
SSLCertificateKeyFile /path_to/server.key
DocumentRoot /doc_root_for_ssl_protected_files
ServerName server.name.com
</VirtualHost>
<VirtualHost x.x.x.x:80>
DocumentRoot /doc_root_for_files_on_port_80/
ServerName otherserver.server.com
DirectoryIndex index.jsp index.html
</VirtualHost>
<VirtualHost x.x.x.x:80>
DocumentRoot /doc_root_for_other_files_on_port_80/
ServerName otherserver2.server.com
DirectoryIndex index.jsp index.html
</VirtualHost>
#ssl config
SSLMutex sem
SSLRandomSeed startup builtin
SSLSessionCache none
ErrorLog logs/ssl.log
</code>
