RE: https without certificate redirects to panel
02-28-2021, 11:20 AM
(This post was last modified: 03-05-2021, 02:44 AM by iraqiboy90.)
The solution for the "https without certificate redirects to panel" problem was found on October.2020
Was waiting for certain someone to update this thread but it never happened.
Anyways, here is the solution:
Add the following code to the end of the main ssl config file at /etc/httpd/conf.d/ssl.conf (Centos 7)
just before the ending tag </VirtualHost>
you will also need to edit the main httpd config file at /etc/httpd/conf/httpd.conf (Centos 7) so the solution above can work.
Change the Directory / directive to this:
There are more problems that happened when this solution was not implemented. The reason for why this fix works is complicated and won't go into.
Was waiting for certain someone to update this thread but it never happened.
Anyways, here is the solution:
Add the following code to the end of the main ssl config file at /etc/httpd/conf.d/ssl.conf (Centos 7)
just before the ending tag </VirtualHost>
Code:
RewriteEngine on
ReWriteCond %{SERVER_PORT} !^80$
RewriteRule ^/(.*) http://%{HTTP_HOST}/$1 [NC,R,L]
you will also need to edit the main httpd config file at /etc/httpd/conf/httpd.conf (Centos 7) so the solution above can work.
Change the Directory / directive to this:
Code:
<Directory />
AllowOverride All
Require all granted
</Directory>
There are more problems that happened when this solution was not implemented. The reason for why this fix works is complicated and won't go into.