Set up apache for https

From Linuxintro
Revision as of 17:57, 27 December 2011 by imported>ThorstenStaerk

This article describes how you can secure your webpage running on apache2 with https. You create demo-certificates yourself for this. This is for SUSE Linux, for Fedora, I recommend http://www.linux-sxs.org/internet_serving/apache2.html

This article assumes you know about SSL, https and certificates.

  1. set up apache
  2. set up your Certification authority and create dummy-certificates
  3. /usr/bin/gensslcert
  4. get your SSL Configuration from the given template
  5. cd /etc/apache2/vhosts.d cp vhost-ssl.template vhost-ssl.conf
  6. change your SSL Configuration
  7. have apache2 start per default with SSL. To do this, edit /etc/sysconfig/apache2: replace APACHE_SERVER_FLAGS="" with APACHE_SERVER_FLAGS="SSL"
  8. restart apache2
  9. /etc/init.d/apache2 restart
  10. make sure you have content to show
  11. echo "this is a test" >> /srv/www/htdocs/index.html
  12. test your configuration
  13. wget --no-check-certificate --no-proxy https://localhost