Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've tried to follow a tutorial on self-generating a SSL Certificate. I've created a file "" and a file "". However, when I restart apache, it doesn't prompt me for the passphrase, as the tutorial suggests.

I also tried to configure my virtual hosts to rewrite to https and it failed.

Do I have to make a change to the httpd config file to make my certificate work?

Here is my virtual host conf:

   <IfDefine SSL> 
   <VirtualHost *:443>


    DocumentRoot /home/project/

    SSLEngine on
    SSLCertificateFile /usr/lib/ssl/
    SSLCertificateKeyFile /usr/lib/ssl/

    #SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown

share|improve this question
up vote 0 down vote accepted

Please post a copy of your configuration files here (The relevant parts in httpd, or if you are using ubuntu/debian the correct virtual host in /etc/apache2/sites-enabled). Without that information it is very hard to figure out whats going on.

Are you sure that you actually told the virtual host (or httpd.conf) file to use the SSL cert? If apache does not know that the key exists it wont do anything with it. You need to have something like this in a VirtualHost

SSLEngine on
  SSLCertificateFile /path/to/www.mysite.csr
  SSLCertificateKeyFile  /path/to/www.mysite.key

Are you sure that you set a password on your SSL key? Are you sure you have enabled SSL for apache, and have port 443 running?

share|improve this answer
I did set a password on my SSL key. I'm not sure if I have port 443 running outside of trying in my brower – Ben Apr 23 '11 at 20:01
http will normally go to port 80, try going to https:// go to, there are two parts in there which talk about enabling SSL(LoadModule part) and the 2nd is a sample virtualhost config – Pratik Amin Apr 23 '11 at 20:04
right, so i followed a similar tutorial. I'm stuck. apache is telling me that SSLEngine module is not included in the server configuration – Ben Apr 23 '11 at 20:10
EDIT: nevermind, try this: httpd stop httpd startssl httpd restart from – Pratik Amin Apr 23 '11 at 20:15
hurray! I sort of have it now. After your wonderful suggestion about a2, I googled that term and came across a great tutorial. I made some changes and I now have SSL working. Thanks so much Pratik! – Ben Apr 23 '11 at 20:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.