Hypertext Transfer Protocol Secure (HTTPS) is a combination of the Hypertext Transfer Protocol with the SSL/TLS protocol to provide encryption and secure (website security testing) identification of the server. HTTPS connections are often used for payment transactions on the World Wide Web and for sensitive transactions in corporate information systems. HTTPS should not be confused with Secure HTTP (S-HTTP) specified in RFC 2660. (http://en.wikipedia.org/wiki/HTTP_Secure)
There are some steps to enable https protocol in apache web server.
- Create your certificate
- Reconfig your apache web server
- Restart your apache web server
1. Create your certificateYou need openssl to create crtificate
root@ubuntu-linux#pwd
/home/tnto
root@ubuntu-linux#openssl genrsa -des3 -out your-certificate-name.key 1024
Generating RSA private key, 1024 bit long modulus
.............................................................................++++++
.................++++++
e is 65537 (0x10001)
Enter pass phrase for your-certificate-name.key:
Verifying - Enter pass phrase for your-certificate-name.key:
root@ubuntu-linux#ls
your-certificate-name.key
Downloads
Public
Templates
Ensure a new file (your-certificate-name.key) was created from some commands above.
root@ubuntu-linux#openssl req -new -key your-certificate-name.key -x509 -days 1000 -out your-certificate-name.crt
Enter pass phrase for your-certificate-name.key:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:ID
State or Province Name (full name) [Some-State]:West Java
Locality Name (eg, city) []:Bogor
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Bogor Agricultural University
Organizational Unit Name (eg, section) []:DKSI
Common Name (eg, YOUR name) []:Sutanto
Email Address []:dksi@ipb.ac.id
2. Reconfig your apache web serverModify your apache web server configuration file, add this to you configuration file
SSLCertificateFile /home/tnto/your-certificate-name.crt
SSLCertificateKeyFile /home/tnto/your-certificate-name.key
3. Restart your apache web server
root@ubuntu-linux#/etc/init.d/apache2 restart