Add SSL to Mac OS X 10.5 Leopard

Sat, Sep 20, 2008

Server / Web Apps

To add SSL to your OS X testing server, you need to configure mod_ssl.

Open Terminal and type the following commands:

* sudo -s
* cd /etc/httpd
* mkdir ssl
* chmod 700 ssl
* cd ssl
* gzip -c –best /var/log/system.log > random.dat
* openssl rand -rand file:random.dat 0

You now need an SSL server certificate. If you just want to test your SSL web server, you can generate what is called a self-signed SSL certificate. It will not be recognized by the browser, and it will probably display error messages or ask you to accept the certificate.  The traffic thru the server will now be encrypted.

If this is what you want, issue this command now (all on one line):

* openssl req -keyout privkey-2001.pem -newkey rsa:1024 -nodes -x509 -days 365 -out cert-2001.pem


This post was written by:

- who has written 50 posts on Mac Lab: An Apple Macintosh OS X, Mac & PC Blog.

1 Comments For This Post

  1. Sean Says:

    thanks , worked perfectly

Leave a Reply