Closed (fixed)
Project:
Barracuda
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Feb 2012 at 02:11 UTC
Updated:
13 Jul 2012 at 23:17 UTC
I am stuck as to how to forward the connection to https on load, instead of by path.
This is how it could be done via the htaccess:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
But since that method forwards all the sites in that platform to https, that is not what is wanted. Any help would be great. Thanks for a great hosting solution.
Comments
Comment #1
bmx269 commentedI found a rule like this :
server {
listen 80;
listen [::]:80;
listen 443 default ssl;
server_name www.example.com;
ssl_certificate /path/to/my/cert;
ssl_certificate_key /path/to/my/key;
if ($ssl_protocol = "") {
rewrite ^ https://$server_name$request_uri? permanent;
}
}
Would this be what I need? and where would I put this on BOA? Would the SSL instructions have a switch that can be added to do this?
Comment #2
omega8cc commentedPlease use this SSL how-to: http://drupalcode.org/project/barracuda.git/blob/HEAD:/docs/SSL.txt
Then create separate
server{}block with domain in question in theserver_nameline instead of_wildcard and add one line afteraccess_logdirective:rewrite ^ https://domain.name/$request_uri? permanent;This needs to be added in the "Plain HTTP proxy" part.
Note that this how-to requires separate IP for this domain, because it is a local proxy.
Or you could enable Aegir standard SSL feature if you have only one IP and enable forced redirect to HTTPS there.
Comment #3
bmx269 commentedThanks
Comment #4
omega8cc commentedComment #6
nrsimha commentedSome time ago I could use on BOA settings in Aegir to automatically redirect to https://, is it still possible to use Aegir interface?
If not, to which file I should add
rewrite ^ https://domain.name/$request_uri? permanent;?There is file for specific site '/data/disk/o1/config/server_master/nginx/vhost.d/domain.name', is somehow possible to set https:// as default there?
Comment #7
omega8cc commented@nrsimha
Your question is already answered above.