Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have nginx with the following setup:

 server {
        listen       80;
        root /home/site/public_html;

        listen       443;
        #root /home/site/public_html;
        ssl_certificate      /root/site.pem;
        ssl_certificate_key  /root/site.key;

However, when I view the SSL connection I am getting:

An error occurred during a connection to

SSL received a record that exceeded the maximum permissible length.

(Error code: ssl_error_rx_record_too_long)

I am using TrustWave Premium SSL as the SSL cert authority.

share|improve this question
up vote 24 down vote accepted

Solved. You need to add "ssl" to the end of the listen.

listen       443 ssl;
share|improve this answer

This error I got in browser when trying to access site over SSL(https) but in fact on that port normal HTTP server was running.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.