subdomain SSL setup on Ubuntu 12.04 LTS Disk

We have following website configured on our Linode disk

  1. http://awplife.com

  2. http://demo.awplife.com

Firstly, we added SSL on our subdomain http://demo.awplife.com. It's was working perfectly.

Today, we purchased separate SSL certificate for http://awplife.com and applied on primary domain http://awplife.com.

The problem is started today. Our subdomain SSL not working and showing the following error OR sometimes redirecting to the primary domain.

Error

Your connection is not private
Attackers might be trying to steal your information from demo.awplife.com (for example, passwords, messages, or credit cards). Learn more
NET::ERRCERTCOMMONNAMEINVALID

Automatically send some system information and page content to Google to help detect dangerous apps and sites.

Here the Configuration fileS for both domain

PRIMARY DOMAIN


domain: awplife.com

public: /var/www/html/awordpresslife/public_html/

<virtualhost *:80=""> ServerAdmin awordpresslife@gmail.com ServerName awplife.com # Index file and Document Root (where the public files are located) DirectoryIndex index.html index.php DocumentRoot /var/www/html/awordpresslife/public_html/ # Log file locations LogLevel warn ErrorLog /var/www/html/awordpresslife/logs/error.log CustomLog /var/www/html/awordpresslife/logs/access.log combined </virtualhost>

<virtualhost *:443="">
SSLEngine On
SSLCertificateFile /etc/ssl/localcerts/10f9e90604dd9660-awplife.com.crt
SSLCertificateKeyFile /etc/ssl/localcerts/awplife.com.key
SSLCACertificateFile /etc/ssl/localcerts/gd_bundle-g2-g1.crt</virtualhost>

ServerAdmin awordpresslife@gmail.com
ServerName awplife.com
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html index.php
DocumentRoot /var/www/html/awordpresslife/public_html/
# Log file locations
LogLevel warn
ErrorLog  /var/www/html/awordpresslife/logs/error.log
CustomLog /var/www/html/awordpresslife/logs/access.log combined

SUB DOMAIN


domain: demo.awplife.com

public: /var/www/html/awordpresslife/publichtml/demo/publichtml/

<virtualhost *:80=""> ServerAdmin awordpresslife@gmail.com ServerName demo.awplife.com # Index file and Document Root (where the public files are located) DirectoryIndex index.html index.php DocumentRoot /var/www/html/awordpresslife/publichtml/demo/publichtml/ # Log file locations LogLevel warn ErrorLog /var/www/html/awordpresslife/publichtml/demo/log/error.log CustomLog /var/www/html/awordpresslife/publichtml/demo/log/access.log combined </virtualhost>

<virtualhost *:443="">
SSLEngine on
SSLCertificateFile /etc/ssl/localcerts/cded763e9bf3f7ac-demo.awplife.com.crt
SSLCertificateKeyFile /etc/ssl/localcerts/demo.awplife.com.key
SSLCACertificateFile /etc/ssl/localcerts/gd_bundle-g2-g1.crt</virtualhost>

ServerAdmin awordpresslife@gmail.com
ServerName demo.awplife.com
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html index.php
DocumentRoot /var/www/html/awordpresslife/public_html/demo/public_html/
# Log file locations
LogLevel warn
ErrorLog  /var/www/html/awordpresslife/public_html/demo/log/error.log
CustomLog /var/www/html/awordpresslife/public_html/demo/log/access.log combined

let me know what I am doing wrong.

Any proper help is really appreciated.

Kind Regards
A WP Life

2 Replies

I ran a quick check on your domain using SSL Labs and got the "Certificate name mismatch" error: This error is most likely occurring because the SSL certificate currently appearing on "demo.awplife.com" is set up for the common name "awplife.com" and not the subdomain "demo.awplife.com." I noticed that you do not have a dedicated IP address for each of your SSL certificates. You can open up a support ticket to request an additional IP which will come at the cost of $1 per IP address. Once you receive your additional IP, you can refer to SSL Certificates with Apache on Debian & Ubuntu if you happen to run into any problems.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct