Michael R. Head ([info]suppressingfire) wrote,
@ 2007-06-23 14:30:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
setting up ssl with apache2 on debian
I was finally forced to migrated to apache2 this week because apache1 has finally been removed from sid. Setting up https turned out to be a bit of a pain. All the HOWTOs online describe the use of a program called "apache2-ssl-certificate" which has been removed (see bug 395823). The commands listed in the bug report don't work either. Here's what I had to do:
  1. sudo apt-get install apache2
  2. sudo a2enmod ssl
  3. sudo mkdir /etc/apache2/ssl
  4. sudo openssl req $@ -config /usr/share/ssl-cert/ssleay.cnf -new -x509 -days 1460 -nodes -out /etc/apache2/ssl/apache.crt -keyout /etc/apache2/ssl/apache.pem
  5. sudo chmod 600 /etc/apache2/ssl/apache.pem
  6. sudo cp /etc/apache2/site-available/default /etc/apache2/site-available/ssl
  7. echo Listen 443 | sudo tee -a /etc/apache2/ports.conf
  8. Change/Add the following lines to the top of /etc/apache2/sites-available/ssl:
    •     NameVirtualHost *:443
    •     <VirtualHost *:443>
    •         SSLEngine On
    •         SSLCertificateFile /etc/apache2/ssl/apache.crt
    •         SSLCertificateKeyFile /etc/apache2/ssl/apache.pem
    •         ...
  9. sudo a2ensite ssl
  10. sudo invokerc.d apache2 restart


Yeah, so it was a lot easier with apache1, but it's done and documented now.




(Post a new comment)


[info]gcrumb
2007-07-05 03:40 am UTC (link)
Hi Michael;

If you think this series of steps might be of interest to others, perhaps you could post it to bug 395823. I only stumbled across it because I thought suppressingfire was an amusing username. 8^)

(Reply to this)

Thank You
(Anonymous)
2007-10-18 12:12 pm UTC (link)
This has been giving me a headache for a few hours. Finally I stumbled across your quick guide here. Thanks again!

(Reply to this)


(Anonymous)
2007-12-27 07:36 pm UTC (link)
You just saved me a lot of time, thank you.

(Reply to this) (Thread)


[info]suppressingfire
2007-12-27 08:29 pm UTC (link)
No problem! Happy to help.

(Reply to this) (Parent)


Create an Account
Forgot your login?
Login w/ OpenID
English • Español • Deutsch • Русский…