Wednesday, June 13, 2012

Enabling SSL on MAC OS-X Snow Leopard

cd /private/etc/apache2/

openssl req -keyout privkey-$(date +%Y-%m).pem -newkey rsa:2048 -nodes -x509 -days 365 -out cert-$(date +%Y-%m).pem

Country Name (2 letter code) [AU]:CH State or Province Name (full name) [Some-State]:Zurich Locality Name (eg, city) []:Zurich Organization Name (eg, company) [Internet Widgits Pty Ltd]:Entropy Organizational Unit Name (eg, section) []:Secure Server Administration Common Name (eg, YOUR name) []:www.entropy.ch Email Address []:liyanage@access.ch

Make sure to enter the sitename properly.

Make sure that TextEdit is not running, then type these lines into the terminal window:

chmod 600 privkey-YYYY-MM.pem

chown root privkey-YYYY-MM.pem

open -a TextEdit /etc/apache2/httpd.conf

Uncomment the lines -

  • LoadModule ssl_module libexec/apache2/mod_ssl.so
  • Include /private/etc/apache2/extra/httpd-ssl.conf 

open -a TextEdit /etc/apache2/extra/httpd-ssl.conf

Edit these lines -

  • SSLCertificateFile /etc/apache2/cert-YYYY-MM.pem
  • SSLCertificateKeyFile /etc/apache2/privkey-YYYY-MM.pem

Restart apache

No comments:

Powered By Blogger
Custom Search