first time setting up ssl, running into a strange problem, tutorials haven't been too helpful

Posted by pedalpete on Server Fault See other posts from Server Fault or by pedalpete
Published on 2010-03-17T03:13:22Z Indexed on 2010/03/17 3:21 UTC
Read the original article Hit count: 373

Filed under:

This is my first time trying to set-up an ssl for one a site, and I'm running it on a server that has 3 other sites already hosted.

I'm running apache2.?? and the install came with an ssl.conf page.

The ssl.conf has the following settings

LoadModule ssl_module modules/mod_ssl.so
Listen 443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl

<VirtualHost *:443>
    ServerAdmin [email protected]
    DocumentRoot /var/www/html/securesite
    ServerName securesite.com
    ErrorLog logs/securesite-error_log
    CustomLog logs/securesite-access_log common
    SSLEngine on
    SSLCertificateFile /etc/httpd/ssl.crt/securesite.com.crt
    SSLCertificateKeyFile /etc/httpd/ssl.key/server.key
    SSLCertificateChainFile /etc/httpd/ssl.crt/gd_bundle.crt
</VirtualHost>

When I run 'apachectl configtest', I don't get any errors, but running 'apachectl -k restart', I get 'httpd not running, trying to start'.

I have two questions

1) Is there an error in the way I'm defining my virtualhost for 443?? the rest of my entries point to <VirtualHost *:80>. When I comment out the above entry, apache runs fine.

2) do I need to set-up a redirect from port 80 for secure site? Because most users are going to go to http: or www. , and I need to send them to https: does apache do this automatically? or do i need to create an entry with a redirect?

© Server Fault or respective owner

Related posts about apache2-ssl