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.

Weird .htaccess behavior
#6
RE: Weird .htaccess behavior
That part didn't help me any LOL.

Anyways, just to make sure, the file has:
  • Listen 80 and Listen 443 at the top
  • shows correct <virtualhost 80:*></virtualhost> entries for the port-forward
I do notice that these 2 lines are entered twice:
Code:
SSLProtocol All -SSLv2 -SSLv3
SSLHonorCipherOrder On

Not 100% sure on this, but these should be combined into one:
Code:
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
Code:
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH

But that should not affect the redirect in anyway.

From testing the URL both http and https, there seems to be no entry for it on port 80.
Example of what your httpd-vhosts.conf should look like:
Code:
################################################################
# Apache VHOST configuration file
# Automatically generated by Sentora 1.0.3
# Generated on: 00:05 1st May 2017 EDT
#==== YOU MUST NOT EDIT THIS FILE : IT WILL BE OVERWRITTEN ====
# Use Sentora Menu -> Admin -> Module Admin -> Apache config
################################################################

Listen 443
Listen 80

# Configuration for Sentora control panel.
---[snip]---

################################################################
# Sentora generated VHOST configurations below.....
################################################################

# DOMAIN: domain.com
<virtualhost *:443>
ServerName domain.com
ServerAlias  www.domain.com
ServerAdmin webmaster@domain.com
DocumentRoot "/var/sentora/hostdata/[username]/public_html/domain_com"
php_admin_value open_basedir "/var/sentora/hostdata/[username]/public_html/domain_com:/var/sentora/temp/"
php_admin_value suhosin.executor.func.blacklist "passthru, show_source, shell_exec, system, pcntl_exec, popen, pclose, proc_open, proc_nice, proc_terminate, proc_get_status, proc_close, leak, apache_child_terminate, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, escapeshellcmd, escapeshellarg, exec"
ErrorLog "/var/sentora/logs/domains/[username]/domain.com-error.log"
CustomLog "/var/sentora/logs/domains/[username]/domain.com-access.log" combined
CustomLog "/var/sentora/logs/domains/[username]/domain.com-bandwidth.log" common
<Directory "/var/sentora/hostdata/[username]/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
</virtualhost>
# END DOMAIN: domain.com
################################################################



# DOMAIN: domain.com
# PORT FORWARD FROM 80 TO: 443
<virtualhost *:80>
ServerName domain.com
ServerAlias www.domain.com
ServerAdmin webmaster@domain.com
RewriteEngine on
ReWriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
</virtualhost>
# END DOMAIN: domain.com
-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
Weird .htaccess behavior - by worksmarter - 05-04-2017, 12:47 PM
RE: Weird .htaccess behavior - by TGates - 05-05-2017, 02:53 AM
RE: Weird .htaccess behavior - by worksmarter - 05-05-2017, 06:53 AM
RE: Weird .htaccess behavior - by TGates - 05-05-2017, 02:07 PM
RE: Weird .htaccess behavior - by worksmarter - 05-05-2017, 02:23 PM
RE: Weird .htaccess behavior - by TGates - 05-05-2017, 04:06 PM
RE: Weird .htaccess behavior - by worksmarter - 05-05-2017, 04:29 PM
RE: Weird .htaccess behavior - by TGates - 05-06-2017, 02:41 AM
RE: Weird .htaccess behavior - by worksmarter - 05-06-2017, 09:01 AM
RE: Weird .htaccess behavior - by TGates - 05-06-2017, 11:55 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Global .htaccess for Sentora and/or Apache rsthomas 2 6 ,469 01-13-2020, 06:52 AM
Last Post: Vedran B
.htaccess has stopped working? tbrady85 2 7 ,191 09-08-2017, 01:56 AM
Last Post: TGates
unexpected vhost/ssl behavior worksmarter 5 13 ,044 03-10-2017, 08:05 AM
Last Post: TGates

Forum Jump:


Users browsing this thread: 3 Guest(s)