Friday, August 31, 2007

How to - CentOS - Apache server with SSL

Most people are finding problems with CentOS , making it https(Secure Socket Layer) web server. CentOS is open source Linux project supported by Redhat. I am configuring machine, making CentOS apache server with SSL. I did google but couldn't find enough information about how to make apache+ssl in CentOS.


CentOS has diffrent configuration for ssl and all certificate generation configuration files have been moved to /etc/pki/tls dir.

Here are the steps to make CentOS apache+ssl (Self-signed certificate)

1. go to /etc/pki/tls/certs
2. make mycert.pem
3. Enter the information about country,state,city,host name etc, your certificate and key has been created .
4. now go to /etc/httpd/conf.d/ssl.conf and change..
SSLCACertificateFile /etc/pki/tls/certs/mycert.pem
SSLCACertificateKeyFile /etc/pki/tls/mycert.pem
5. save changes.
6. on shell prompt service httpd start

thats it!!!


Your apache web server with ssl start working.

to check that whether ssl is working or not, do
https://localhost and you prompted with security alert window.
or
netstat -an|grep 443 , you will find ::443 listening , that is ssl listening.

2 comments:

MoNsterPanic said...

CentOS is not supported by RH.

Jason said...

How do you get Apache2 do to "do SSL" though? Compile Mod_ssl? Compile Apache? Is there anyway in the USA to just a 64bit mod and load it in apache2?

Thanks in advance!
--Jason