Vahid Ghafarpour's Blog

نكات جالب از نظر وحيد غفارپور!

Monday, January 1, 2007

SSL for Apache2 on Ubuntu

from ubuntuforums.org
http://www.ubuntuforums.org/archive/index.php/t-4466.html

apt-get install apache2 libapache-mod-ssl
apache2-ssl-certificate
(and answer the questions)

Now, enable ssl:
a2enmod ssl

configure ssl:
cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl
ln -s /etc/apache2/sites-available/ssl /etc/apache2/sites-enabled/ssl
"/etc/apache2/sites-enabled/ssl" should look like this:

NameVirtualHost *:443

(... configure the directories too...)
and "/etc/apache2/sites-enabled/default" should look like this:

NameVirtualHost *:80

(... configure the directories too...)
In /etc/apache2/ports.conf, add Listen 443

In the middle of /etc/apache2/sites-available/ssl file, insert this two lines:

SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.pem

it's better use your domain named instead of * for NameVirtualHost else you will get SSL warning because of SSL server name error

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home