Sentora Support Forums

Full Version: Let's Encrypt SSL and HTTPS Redirect Issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Did you use a tutorial on these forums?

Suggested tutorials for let's encrypt:
Panel login:
http://forums.sentora.org/showthread.php?tid=3297

All other domains/sub domains:
http://forums.sentora.org/showthread.php?tid=2535
Yeah, I followed that guide (although I think it was responses somewhere else).