![]() |
|
Let's Encrypt SSL and HTTPS Redirect Issue - Printable Version +- Sentora Support Forums (https://senforums.mach-hosting.com) +-- Forum: Sentora Forum Archives (https://senforums.mach-hosting.com/forumdisplay.php?fid=5) +--- Forum: Sentora Public Support Forums v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=32) +---- Forum: General Support Forum v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=36) +---- Thread: Let's Encrypt SSL and HTTPS Redirect Issue (/showthread.php?tid=3549) |
Let's Encrypt SSL and HTTPS Redirect Issue - dsmarter - 02-14-2017 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 RE: Let's Encrypt SSL and HTTPS Redirect Issue - TGates - 02-15-2017 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 RE: Let's Encrypt SSL and HTTPS Redirect Issue - dsmarter - 02-15-2017 Yeah, I followed that guide (although I think it was responses somewhere else). |