Self Cert SSL certificate for Apache2 on Ubuntu 8.04LTS
Generate a self cert certificate:
https://help.ubuntu.com/8.04/serverguide/C/certificates-and-security.html
Create a new virtual host (you can only have one SSL virtual host / IP)
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl
Edit ssl sothat it looks like this:
NameVirtualHost *:443
ServerName webangle-www1.everyangle.co.uk
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
SSLEngine on
SSLOptions +StrictRequire
SSLCertificateFile /etc/ssl/certs/server.crt
SSLCertificateKeyFile /etc/ssl/private/server.key
Finally, if you want to force redirect of all traffic to a certain folder via SSL (e.g, /phpmyadmin), add the following to /etc/apache2/sites-available/default
#Redirect traffic to /phpmyadmin through https
RewriteEngine on
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^/phpmyadmin(.*)$ https://%{SERVER_NAME}/phpmyadmin$1 [L,R]
Enable it:
sudo a2ensite ssl sudo /etc/init.d/apache2 reload
Comments
One Comment on Self Cert SSL certificate for Apache2 on Ubuntu 8.04LTS
-
unix86.org » Configure Apache2 Self-Signed SSL Certificate on Ubuntu 8.04.2 AMD64 LTS on
Fri, 8th May 2009 4:01 pm
[...] https://help.ubuntu.com/8.04/serverguide/C/certificates-and-security.html https://help.ubuntu.com/community/forum/server/apache2/SSL http://twpug.net/modules/newbb/viewtopic.php?topic_id=2893 http://www.tc.umn.edu/~brams006/selfsign_ubuntu.html http://www.linode.com/wiki/index.php/Apache2_SSL_in_Ubuntu http://alephzarro.com/blog/2007/01/07/installation-of-subversion-on-ubuntu-with-apache-ssl-and-basicauth/ http://davidlaing.com/2008/12/27/self-cert-ssl-certificate-for-apache2-on-ubuntu-804lts/ [...]
Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!
You must be logged in to post a comment.


