configure apache to work with ssl

Hi, I need help to configure the apache to work with ssl.

I have managed to create self-signed certificate according to the instruction in the following link.
So I have the crt file and the key file.

however when I add:

<Virtualhost *:443>
               SSLEngine on
               SSLCertificateFile /etc/httpd/conf/ssl.crt
               SSLCertificateKeyFile /etc/httpd/conf/ssl.key
</VirtualHost>

But it telling me "_default_ VirtualHost overlap on port 443, the first precedence"

I understand that I should have edited actually the ssl.conf, but I don't know what exactly should I edit there.
That is where I need help.

I run the apache on centos 5.5 64bit.

Thank in advance.

You can have a look here

(On the above link, they were on a debian linux, so the config file may change a bit in your case)

but what they mainly did were :

edit the file

vi /etc/apache2/ports.conf

look for :

NameVirtualHost *:80
Listen 80

and after it, make sure you have the lines (or add it)

NameVirtualHost *:443
<IfModule mod_ssl.c>
Listen 443
</IfModule>

restart apache

(you may then also need to delete / recreate SSL certificate )

---------- Post updated at 07:01 PM ---------- Previous update was at 06:48 PM ----------

I also saw the following on this link :

LoadModule vhost_alias_module   /ton-path/mod_vhost_alias.so

<IfDefine  SSL>
     Listen  443

     <VirtualHost _default_:443>
            ServerName intranet.mondomaine.com
            SSLEngine On
            SSLCertificateFile /etc/apache2/ssl/phoenix.crt
            SSLCertificateKeyFile /etc/apache2/ssl/phoenix.key
     </VirtualHost>
</IfDefine>

...

So maybe it can be adapted to your case ...