Problems with additional SSL certificates


#1

Hello,

I’m running Ubuntu 14.04 with Apache/2.4.7. I have a primary domain with godaddy certificate. And a few additional domains with LetsEncrypt certificates. Sometimes when i go to www.additionaldomain.com - it is loading my primary domain certificate, which of course becomes invalid (domain mismatch)… I’m using one IP for all domains.

Any ideas, why it is happening?

Here is my primarydomain conf file:

<VirtualHost myprimarydomain.com:80>
	ServerAdmin my@email.com
    ServerName myprimarydomain.com
    ServerAlias www.myprimarydomain.com
	DocumentRoot /var/www/html/myprimarydomain.com/public_html


	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined


#Awstats
Alias /awstatsclasses "/usr/share/awstats/lib/"
Alias /awstats-icon "/usr/share/awstats/icon/"
Alias /awstatscss "/usr/share/doc/awstats/examples/css"
ScriptAlias /awstats/ /usr/lib/cgi-bin/
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch



<Directory "/var/www/html">
AllowOverride All
</Directory>
</VirtualHost>

<IfModule mod_ssl.c>
	<VirtualHost myprimarydomain.com:443>
		ServerAdmin my@email.com

		DocumentRoot /var/www/html/myprimarydomain.com/public_html
            ServerName myprimarydomain.com
            ServerAlias www.myprimarydomain.com


		ErrorLog ${APACHE_LOG_DIR}/error.log
		CustomLog ${APACHE_LOG_DIR}/access.log combined


		#2017
	       SSLEngine on
           SSLCertificateFile /etc/apache2/ssl/2017/2cec62807dee0ace.crt
           SSLCertificateKeyFile /etc/apache2/ssl/2017/apache.key
           SSLCertificateChainFile /etc/apache2/ssl/2017/gd_bundle-g2-g1.crt
		

		
		<FilesMatch "\.(cgi|shtml|phtml|php)$">
				SSLOptions +StdEnvVars
		</FilesMatch>
		<Directory /usr/lib/cgi-bin>
				SSLOptions +StdEnvVars
		</Directory>

		
		BrowserMatch "MSIE [2-6]" \
				nokeepalive ssl-unclean-shutdown \
				downgrade-1.0 force-response-1.0
		# MSIE 7 and newer should be able to use keepalive
		BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

	</VirtualHost>
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Thank you!


#2

Without the real details it’s very difficult to say.

Can you provide the domain names in question ?


#4

It looks on that domain at the moment if you are using cloudflare, and the SSL certificates on cloudflare rather than your own server.


#5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.