Let's Encrypt SSL and HTTPS Redirect Issue
#1
Let's Encrypt SSL and HTTPS Redirect Issue
Hello all,

I have a VPS running CentOS Linux 7 (Core) with Sentora 1.0.3 installed.

I have enabled a free SSL encryption from Let's Encrypt on my Sentora panel as well as a domain on my account. Both are working fine when I type in https://panel.domain.com and https://domain.com.

The domain will work without the https://, but  the sentora panel will not work without the https:// (likely because it's port is changed in the sentora config to just 443).

Following the suggestions on Apache documentation, which suggested not using .htaccess, I edited the vhosts file the look like the below (I only included the panel but the other domain is configured using the same method):


Code:
#Listen 443 #Listen 80 NameVirtualHost *:80 NameVirtualHost *:443 <VirtualHost *:80> ServerName panel.domain.com ServerAlias www.panel.domain.com redirect "/" "https://panel.domain.com" </VirtualHost> <VirtualHost *:443> DocumentRoot "/etc/sentora/panel/" ServerName panel.domain.com ServerAlias www.panel.domain.com ##REST OF CONFIG REMOVED FOR BREVITY </virtualhost>

I had to comment out the Listen 443 and Listen 80, otherwise, the httpd.service would fail the start (I also commented on this bug on GitHub https://github.com/sentora/sentora-core/issues/250).

Anyways, the redirect does not work for either domain.

I also tried with the .htaccess file under "/etc/sentora/panel/.htaccess" with these commands:
Code:
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]


I cannot get the HTTPS redirect to work.

It might be worth pointing out that I tried restarting the httpd service in between and ran the Sentora daemon via shell (php -q /etc/sentora/panel/bin/daemon.php) after changing the vhosts file.

Can anyone else provide any insight into why this is not working?

Thanks!

Gordon
Reply


Messages In This Thread
Let's Encrypt SSL and HTTPS Redirect Issue - by dsmarter - 02-14-2017, 11:54 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
https without certificate redirects to panel iraqiboy90 10 27 ,483 02-28-2021, 11:20 AM
Last Post: iraqiboy90
Old issue on Daily Backup iraqiboy90 24 132 ,546 12-26-2020, 12:48 PM
Last Post: conglynina
Having both HTTP & HTTPS (Port 443 and Port 80) sites on a server dsmarter 14 52 ,066 08-22-2020, 02:49 PM
Last Post: kenzopoker1

Forum Jump:


Users browsing this thread: 1 Guest(s)