Posts

Showing posts from July, 2012

Using a Self signed Certificate to Run Apache2 under SSL

The instructions will help you to generate a self signed certificate with to run Apache2 under SSL. Using a Commercial certificate is always a better idea but in Dev. env. or some sort of testing we can use Self Signed certificate. First of All enable SSL for Apache #a2enmod ssl Now create a directory where we will store our keys/(pem,key) for our self signed certificate #mkdir /etc/apache2/certificate Now generate the keys for our self signed certificate, you will be asked about the information which you have to provide #openssl req -new -x509 -days 1095 -nodes -out /etc/apache2/certificate/apache.pem -keyout /etc/apache2/certificate/apache.key Generating a 1024 bit RSA private key ..............++++++ .......................++++++ writing new private key to '/etc/apache2/certificate/apache.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 D

SSL received a record that exceeded the maximum permissible length. (Error code: ssl_error_rx_record_too_long)

This issue usually occures when the link is not created, link can be created using the below command #ln -s /etc/apache2/sites-available/default-ssl /etc/apache2/sites-enabled/000-default-ssl 

Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] ((null):0)

The error occurs usually when 1.When certificate file is not present at the said location 2.When SSL configuration is correct If both of the above points are not creating an issue 3.Then you need to add/update following /etc/apache2/ports.conf from(without quotes) "Listen 443" to "Listen 443 http"