troubleshooting Question

Problem with SSL Sites Certification

Avatar of Mario Lima
Mario Lima asked on
Linux* ssl certChromeSSL / HTTPSWeb Browsers
8 Comments5 Solutions220 ViewsLast Modified:
Hello,

I am installing SSL Certification on my Linux Centos Server. And I am trying the first Domains. It is almost working. But I have one strange problem. If I use a URL to the Site root (www) it comes as Secure. But if I use a URL to any internal directory it comes as Unsecure, depending on using www or a slash at the end.

Please try it in your Chrome Browser, but, clear its Cache memory between the tests. I have added SSL to 2 of our Sites:

segurosagro.com.br
multisites.com.br

And I created a simple directory called testredirect which has just an index.html file with an image.

1) segurosagro.com.br/testredirect

It comes as Unsecure.

2) segurosagro.com.br/testredirect/

It works, and comes as Secure.

3) www.segurosagro.com.br/testredirect

It also works, and comes as Secure.

In the same way:

1) multisites.com.br/testredirect

It comes as Unsecure.

2) multisites.com.br/testredirect/

It works, and comes as Secure.

3) www.multisites.com.br/testredirect

It also works, and comes as Secure.

My actual httpd.conf <virtualhosts> entries for segurosagro.com.br and multisites.com.br are as below. You will see that they are slightly different. This is due to tests I was doing trying to solve the problem:

#--------------------------------------------------------
#                 multisites.com.br
#--------------------------------------------------------
<virtualhost 66.226.75.86:80>
ServerAdmin webmaster@multisitesdominios.com.br
ServerName www.multisites.com.br
ServerAlias multisites.com.br
ServerAlias www.multisites.net.br
DocumentRoot /var/www/html/multisites/www
ScriptAlias /cgi-bin/ /var/www/html/multisites/www/cgi-multisites/
<Directory "/var/www/html/multisites/www/cgi-multisites/">
        Options ExecCGI Includes
        AllowOverride None
</Directory>
ErrorLog logs/multisites-error-log
TransferLog logs/multisites-access-log
#
#Redirection to https
#
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
</virtualhost>

#--------------------------------------------------------
#                 segurosagro.com.br
#--------------------------------------------------------
<virtualhost 66.226.75.86:80>
ServerAdmin webmaster@multisitesdominios.com.br
ServerName www.segurosagro.com.br
ServerAlias segurosagro.com.br
DocumentRoot /home/segurosagro/www
ScriptAlias /cgi-bin/ /home/segurosagro/www/cgi-segurosagro/
<Directory "/home/segurosagro/www/cgi-segurosagro/">
        Options ExecCGI Includes
        AllowOverride None
</Directory>
TransferLog logs/segurosagro-access-log
#
#Redirection to https
#
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
</virtualhost>

Thanks for any help.
SOLUTION
David Favor
Fractional CTO
Join our community to see this answer!
Unlock 5 Answers and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 5 Answers and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros