Mario Lima
asked on
Problem with SSL Sites Certification
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/testred irect
It comes as Unsecure.
2) segurosagro.com.br/testred irect/
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/testredi rect
It comes as Unsecure.
2) multisites.com.br/testredi rect/
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@multisitesdomini os.com.br
ServerName www.multisites.com.br
ServerAlias multisites.com.br
ServerAlias www.multisites.net.br
DocumentRoot /var/www/html/multisites/w ww
ScriptAlias /cgi-bin/ /var/www/html/multisites/w ww/cgi-mul tisites/
<Directory "/var/www/html/multisites/ www/cgi-mu ltisites/" >
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@multisitesdomini os.com.br
ServerName www.segurosagro.com.br
ServerAlias segurosagro.com.br
DocumentRoot /home/segurosagro/www
ScriptAlias /cgi-bin/ /home/segurosagro/www/cgi- segurosagr o/
<Directory "/home/segurosagro/www/cgi -segurosag ro/">
Options ExecCGI Includes
AllowOverride None
</Directory>
TransferLog logs/segurosagro-access-lo g
#
#Redirection to https
#
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI } [R=301,L]
</virtualhost>
Thanks for any help.
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/testred
It comes as Unsecure.
2) segurosagro.com.br/testred
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/testredi
It comes as Unsecure.
2) multisites.com.br/testredi
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@multisitesdomini
ServerName www.multisites.com.br
ServerAlias multisites.com.br
ServerAlias www.multisites.net.br
DocumentRoot /var/www/html/multisites/w
ScriptAlias /cgi-bin/ /var/www/html/multisites/w
<Directory "/var/www/html/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
</virtualhost>
#-------------------------
# segurosagro.com.br
#-------------------------
<virtualhost 66.226.75.86:80>
ServerAdmin webmaster@multisitesdomini
ServerName www.segurosagro.com.br
ServerAlias segurosagro.com.br
DocumentRoot /home/segurosagro/www
ScriptAlias /cgi-bin/ /home/segurosagro/www/cgi-
<Directory "/home/segurosagro/www/cgi
Options ExecCGI Includes
AllowOverride None
</Directory>
TransferLog logs/segurosagro-access-lo
#
#Redirection to https
#
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI
</virtualhost>
Thanks for any help.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi, guys, I thank you a lot for all the suggestions and comments. I have submitted everything to my technician, and I will tell you later how the things have gone.
Mário Lima./
Mário Lima./
Mihai's suggestion is useful.
Best sontributions are the 2 from David.
Best sontributions are the 2 from David.
The problem you mention with certbot-auto might come from a slight versions difference between the "standard" version (ie the one you get with ap-get install). Downloading the script and using it does not have those problem and the srcipt updates itself (if needed) before renewing yhe certs