Skip to main content

Posts

Showing posts from March, 2012

Apache - HTTPS Configuration - Ubuntu

One of my friend wanted to enable SSL for apache, just like Tomcat which I have blogged earlier. Creating Certificate and Certificate-Key First lets create a certificate and Key for our Apache webserver. Lets create directory in /etc/apache2/ssl where is the new directory. ahmed@ubuntu:/etc/apache2/ssl$ sudo openssl req -new -x509 -days 365 -keyout vhost1.key -out vhost1.crt -nodes -subj '/O=Test India/OU=IT/CN=swift.test.com' Generating a 1024 bit RSA private key ..................................++++++ .++++++ writing new private key to 'vhost1.key' ----- ahmed@ubuntu:/etc/apache2/ssl$ ls vhost1.crt vhost1.key Once we have the Crt/Key created now lets Add port 443 to our configuration as Apache by default accepts Port 80. Add information in Port.conf (/etc/apache2/ports.conf) You will see that we have only NameVirtualHost *:80 and No 443 is available, so add NameVirtualHost *:443 to this like below. NameVirtualHost *:80 NameVirtualHost *:4...