This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

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
Thanks given by:
#2
RE: Let's Encrypt SSL and HTTPS Redirect Issue
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
-TGates - Project Council

SEARCH the Forums or read theĀ DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#3
RE: Let's Encrypt SSL and HTTPS Redirect Issue
Yeah, I followed that guide (although I think it was responses somewhere else).
Reply
Thanks given by:


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

Forum Jump:


Users browsing this thread: 1 Guest(s)