Issue
HTTPS Redirect
I was wondering if there is any configuration in ClearOS for settingup a https redirect for the webconfig.
i now manualy opend the flex-80.conf of httpd to add some lines of code as showed below.
Is there in the webconfig a setting that could do this for me because every time i change something in the webserver i have to add this manualy ?
Would be nice if i setup a SSL-cert to a webserver is automaticly adds those lines of code to the webserver running on port 80. Or just a extra setting in the vhost on the webconfig to enable http to https redirect that add those lines of code.
Already tryed with "Port Forwarding" app but that doesn't work on my side.
i now manualy opend the flex-80.conf of httpd to add some lines of code as showed below.
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
Is there in the webconfig a setting that could do this for me because every time i change something in the webserver i have to add this manualy ?
Would be nice if i setup a SSL-cert to a webserver is automaticly adds those lines of code to the webserver running on port 80. Or just a extra setting in the vhost on the webconfig to enable http to https redirect that add those lines of code.
Already tryed with "Port Forwarding" app but that doesn't work on my side.
In Web Server
Share this post:
Responses (7)
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
I cannot see how "port forwarding" would help. In reality you would not port forward but use a PREROUTING rule to DNAT from port 80 to port 443, but then a browser/client would see https traffic/handshaking over port 80 as far as it is concerned and I would have thought it would find it a little odd. Do you think it would force it to switch to 443? -
Accepted Answer
just added a flexshare an checked te posibilitys with that there is also a web thing on it but in there is a possibility to setup portforwarding. But for the webserver it's not.
i think i will fix it as you say with the .htaccess file but would be nice if its in the httpd config of in the webconfig of the webserver. -
Accepted Answer
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »