Tuesday, September 8, 2009

SSL for Apache on Ubuntu

1. Install curl:

sudo apt-get install curl

2. Enable SSL module:

sudo a2enmod ssl

3. Restart Apache server:

sudo /etc/init.d/apache2 restart

4. Enable site default-ssl:

sudo a2ensite default-ssl

5. Activate new configuration:

sudo /etc/init.d/apache2 reload

6. Test both http and https output with curl:

curl -k http://localhost
curl -k https://localhost

Both commands will have the same output like this:

<html><body><h1>It works!</h1></body></html>

No comments: