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.

Redirect to https
#6
RE: Redirect to https
Maybe my eyes are missing it, here's mine:

Code:
# DOMAIN: domain.com
<virtualhost *:443>
ServerName domain.com
ServerAlias  www.domain.com
ServerAdmin tgates@domain.com
DocumentRoot "/var/sentora/hostdata/zadmin/public_html/domain_com"
ErrorLog "/var/sentora/logs/domains/zadmin/domain.com-error.log"
CustomLog "/var/sentora/logs/domains/zadmin/domain.com-access.log" combined
CustomLog "/var/sentora/logs/domains/zadmin/domain.com-bandwidth.log" common
<Directory "/var/sentora/hostdata/zadmin/public_html/domain_com">
 Options +FollowSymLinks -Indexes
 AllowOverride All
 Require all granted
</Directory>
AddType application/x-httpd-php .php3 .php
ErrorDocument 415 /_errorpages/415.html
ErrorDocument 413 /_errorpages/413.html
ErrorDocument 400 /_errorpages/400.html
ErrorDocument 404 /_errorpages/404.html
ErrorDocument 403 /_errorpages/403.html
ErrorDocument 500 /_errorpages/500.html
ErrorDocument 408 /_errorpages/408.html
ErrorDocument 510 /_errorpages/510.html
DirectoryIndex index.php index.html index.htm index.asp index.aspx index.jsp index.jspa index.shtml index.shtm
# Custom Global Settings (if any exist)

# Custom VH settings (if any exist)
SSLEngine on
SSLProtocol ALL -SSLv2 -SSLv3
SSLHonorCipherOrder On
SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
SSLCertificateFile /etc/letsencrypt/live/domain.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/domain.com/chain.pem
# Keeping below for future upgrades.
# Requires Apache >= 2.4
SSLCompression off

# Alias for MySQL login
Alias "/mysql" "/etc/sentora/panel/etc/apps/phpmyadmin"
<Directory "/etc/sentora/panel/etc/apps/phpmyadmin/">
   php_admin_value open_basedir /etc/sentora/panel/etc/apps/phpmyadmin
   Options +FollowSymLinks -Indexes
   AllowOverride All
   Require all granted
</Directory>
# Alias for roundcube WebMail login
Alias "/webmail" "/etc/sentora/panel/etc/apps/webmail"
<Directory "/etc/sentora/panel/etc/apps/webmail/">
   php_admin_value open_basedir /etc/sentora/panel/etc/apps/webmail
   Options +FollowSymLinks -Indexes
   AllowOverride All
   Require all granted
</Directory>
# Alias for rainloop WebMail login
Alias "/mail" "/etc/sentora/panel/etc/apps/rainloop"
<Directory "/etc/sentora/panel/etc/apps/rainloop/">
   php_admin_value open_basedir /etc/sentora/panel/etc/apps/rainloop
   Options +FollowSymLinks -Indexes
   AllowOverride All
   Require all granted
</Directory>

</virtualhost>
# END DOMAIN: domain.com
################################################################



# DOMAIN: domain.com
# PORT FORWARD FROM 80 TO: 443
<virtualhost *:80>
ServerName domain.com
ServerAlias www.domain.com
ServerAdmin tgates@domain.com
RewriteEngine on
ReWriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
</virtualhost>
# END DOMAIN: domain.com
PS: Always put code in either [code] or [php] tags for better forum viewing.
-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:


Messages In This Thread
Redirect to https - by etienne7702 - 03-09-2017, 07:25 PM
RE: Redirect to https - by TGates - 03-10-2017, 01:42 AM
RE: Redirect to https - by etienne7702 - 03-10-2017, 04:27 AM
RE: Redirect to https - by Ron-e - 03-10-2017, 04:35 AM
RE: Redirect to https - by etienne7702 - 03-10-2017, 04:42 AM
RE: Redirect to https - by TGates - 03-10-2017, 04:45 AM
RE: Redirect to https - by etienne7702 - 03-10-2017, 04:56 AM
RE: Redirect to https - by TGates - 03-10-2017, 05:15 AM
RE: Redirect to https - by etienne7702 - 03-10-2017, 05:28 AM
RE: Redirect to https - by TGates - 03-10-2017, 08:11 AM
RE: Redirect to https - by etienne7702 - 03-10-2017, 05:52 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
[HOW TO] How to secure your sentora panel with SSL (HTTPS) easy guide SupaYoshi 32 134 ,015 11-18-2016, 05:34 AM
Last Post: worksmarter
Roundcube Webmail https path pthalmann 0 4 ,895 12-29-2014, 09:09 AM
Last Post: pthalmann

Forum Jump:


Users browsing this thread: 2 Guest(s)