GoDaddy SSL on Apache, Ubuntu 11.10

Summary: A personal walkthrough of setting up GoDaddy SSL certificates on Apache 2.x running Ubuntu 11.10 — covering CSR generation, Apache configuration directives, and resolving the ssl_error_rx_record_too_long error.

GoDaddy SSL on Apache, Ubuntu 11.10

So I am setting up astoreforbeauty.com, winwinhost.com, and imagemodifier.com SSL certificates. I purchased the SSL certificates from GoDaddy.

Signing into my account and clicking "Launch" on the SSL certificate listed in the SSL management page, the first step is to generate the Certificate Signing Request (CSR). GoDaddy provides a handy guide for Apache 2.x.

Step 1 — Generate the CSR

Log in to your server via SSH and run:

openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr

Replace yourdomain with the domain you're securing. Answer the prompts — avoid abbreviations for States and Cities. Open the .csr file and paste its full contents into the SSL enrollment form in your GoDaddy account. You'll receive an email when your certificate is ready.

Step 2 — Install the Certificate on Apache

Download the certificate bundle from GoDaddy and follow these steps:

  1. Copy your SSL certificate file and the certificate bundle to your Apache server. You should already have the .key file from the CSR step.
  2. Edit your Apache SSL configuration. In Apache 2.x this is typically ssl.conf.
  3. Locate (or add) these three directives and set them to the correct paths:
SSLCertificateFile    /path/to/your/certificate.crt
SSLCertificateKeyFile /path/to/your/yourdomain.key
SSLCertificateChainFile /path/to/godaddy-intermediate-bundle.crt
  • Save the file and restart Apache:
  • sudo service apache2 restart

    Fixing ssl_error_rx_record_too_long

    After the initial setup I hit this error in Firefox:

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

    This typically means Apache is serving plain HTTP traffic on port 443 instead of HTTPS. The fix is to ensure you have a dedicated <VirtualHost *:443> block for the domain:

    <VirtualHost *:443>
      ServerName www.astoreforbeauty.com
      SSLEngine on
      SSLCertificateFile    /path/to/certificate.crt
      SSLCertificateKeyFile /path/to/yourdomain.key
      SSLCertificateChainFile /path/to/bundle.crt
      ...
    </VirtualHost>

    Best practice is to isolate each SSL domain on a dedicated IP address to avoid SNI complications on older Apache versions.

    Frequently Asked Questions

    How do I generate a CSR for GoDaddy SSL on Apache?
    SSH into your server and run openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr. Fill in the prompts without abbreviations, then paste the CSR into GoDaddy's enrollment form.
    How do I fix ssl_error_rx_record_too_long?
    Add a dedicated <VirtualHost *:443> block for your domain in Apache's SSL config. The error means Apache is serving HTTP on port 443 instead of HTTPS.
    Which Apache directives are needed for GoDaddy SSL?
    You need SSLCertificateFile, SSLCertificateKeyFile, and SSLCertificateChainFile inside your SSL VirtualHost block. Restart Apache after saving.