RE: [HOW TO] How to secure your sentora panel with SSL (HTTPS) easy guide
04-19-2015, 09:14 PM
(This post was last modified: 04-19-2015, 09:19 PM by carl.victor.
Edit Reason: wrong codes
)
a little bit different from the tutorial
moved sentora to port 2083, same as Cpanel
1. i created new configuration files /etc/sentora/configs/apache/http-panel-redir.conf
here is the configuration to force redirection from port 80 to port 2083
then add this line to /etc/sentora/configs/apache/httpd.conf
2. go to Server Admin > Sentora Config > set sentora apache port to 2083
3. go to Apache Admin, add these SSL configs to Global Sentora Entry
4. restart apache, run the daemon using
this configuration also works well if you want to redirect sentora panel fqdn only to ssl port (443)
just change the rewrite rules in first step to
and change Sentora Apache port to 443
when requesting sentora fqdn (via port 80), it will redirects you to desired port and protocol (https)
but when requesting ip address, it will redirects to the first website listed in httpd-vhosts.conf
just a little protection to my sentora login page with noob-ways
moved sentora to port 2083, same as Cpanel
1. i created new configuration files /etc/sentora/configs/apache/http-panel-redir.conf
here is the configuration to force redirection from port 80 to port 2083
Code:
<virtualhost *:80>
ServerName sentora.mydomain.tld
RewriteEngine on
ReWriteCond %{SERVER_PORT} !^2083$
RewriteRule ^/?(.*) https://%{SERVER_NAME}:2083/$1 [NC,R,L]
</virtualhost>
then add this line to /etc/sentora/configs/apache/httpd.conf
Code:
Include /etc/sentora/configs/apache/http-panel-redir.conf
2. go to Server Admin > Sentora Config > set sentora apache port to 2083
3. go to Apache Admin, add these SSL configs to Global Sentora Entry
Code:
SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCipherSuite "CDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNU$
SSLEngine on
SSLCertificateFile /path/to/my-certificate.crt
SSLCertificateKeyFile /path/to/my-key.decr.key
SSLCACertificateFile /path/to/my/root.ca.pem
Code:
php -q /etc/sentora/panel/bin/daemon.php
this configuration also works well if you want to redirect sentora panel fqdn only to ssl port (443)
just change the rewrite rules in first step to
Code:
<virtualhost *:80>
ServerName sentora.mydomain.tld
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</virtualhost>
when requesting sentora fqdn (via port 80), it will redirects you to desired port and protocol (https)
but when requesting ip address, it will redirects to the first website listed in httpd-vhosts.conf
just a little protection to my sentora login page with noob-ways