Create an Account
username: password:
 
  MemeStreams Logo

Setting up Apache with mod_ssl

search

Lost
Picture of Lost
My Blog
My Profile
My Audience
My Sources
Send Me a Message

sponsored links

Lost's topics
Arts
Business
Games
Health and Wellness
Home and Garden
Miscellaneous
Current Events
Recreation
Local Information
Science
Society
Sports
Technology

support us

Get MemeStreams Stuff!


 
Setting up Apache with mod_ssl
Topic: Technology 7:39 pm EDT, Sep 13, 2007

I'm running a system that includes virtual servers which makes the setup a tiny bit more complex. Following the instructions above I get the following error message (in /var/log/apache/error.log) when I try to start the server.

[error] mod_ssl: Init: (www.xfly.co.uk:80) Illegal attempt to re-initialise\
SSL for server (theoretically shouldn't happen!)

This is fixed by including the lines that activate the SSL Engine in a virtual host declaration rather than in the main server definition. I think it has something to do with the way mod-ssl is compiled but don't quote me on that. Anyway an example virtual host declaration is show below (with a modified email address):


ServerAdmin webmaster@example.com
DocumentRoot /somewhere/crazysquirrel.com
ServerName www.crazysquirrel.com
ErrorLog /var/log/apache/error.log
CustomLog /var/log/apache/crazysquirrel.log combined

SSLEngine on
SSLCertificateFile /etc/apache/ssl.crt/www.crazysquirrel.com.crt
SSLCertificateKeyFile /etc/apache/ssl.key/www.crazysquirrel.com.key
SSLLog /var/log/apache/crazysquirrel_ssl.log
SSLLogLevel warn

The other problem you may encounter is not having Apache bind port 443. In your server configuration file (httpd.conf) you need to enter the lines:

Listen 80
Listen 443

If you enter only the second line Apache won't bind port 80 and your non-ssl websites will stop working.

Setting up Apache with mod_ssl



 
 
Powered By Industrial Memetics
RSS2.0