How do I get port 80 requests to redirect to 443? httpd.conf is empty. Currently, when someone goes to http, they get the Jumpbox page with a link to the https site. I'm using the latest version of Joomla.
thanks
http redirect to httpsSubmitted by shealambert on Thu, 10/08/2009 - 10:56amHow do I get port 80 requests to redirect to 443? httpd.conf is empty. Currently, when someone goes to http, they get the Jumpbox page with a link to the https site. I'm using the latest version of Joomla. |
JumpBox Collections
|
Workaround
I had the same issue with my SugarCRM5 Jumpbox. I took the files ssl-custom.html and ssl-auto.html located in /var/data/jbhtml and replaced them (make backups first) each with the code below (keeping the same names). This is redirect code we've used on our other websites for years just for this situation.
You'll need root access to change these files (http://wiki.jumpbox.com/doc/runtime/faq/access_as_root). This is not an upgrade safe mod.
The code below redirects http://foo.com to https://foo.com automatically. Make the necessary edits for your site.
Rick
<html> <head> <title>Redirect to foo.com</title> <noscript> <!-- meta-tag "refresh" is provided for those browsers that do not support JavaScript. Please note that the time delay is greater than zero. Notice that this is nested within a "noscript" block. Which means that browsers that support JavaScript will not "see" the refresh meta-tag. --> <meta http-equiv="refresh" content="2; URL=https://foo.com"> </noscript> <script language="JavaScript"> <!-- // This is the file to which we will redirect. // IF this is changed please remember to change the // entries in the meta-refresh as well as in the // link in the document body. // // sTargetURL is declared in the JavaScript 1.0 version // code block but it will be available in all later version // JavaScript code blocks. // var sTargetURL = "https://foo.com"; function doRedirect() { // The JavaScript 1.0 version of this function supports // browsers that don't have the ability to replace this // file in the browser history. As a result we want to // make sure that we briefly delay so when the visitor // is moving back through their browser-history they // will have time to press the back-button on this page // before the script moves them to the redirection // target page again. // // Notice that we have the timeout the same amount as in // the meta-refresh version. // setTimeout( "window.location.href = sTargetURL", 2*1000 ); // The 2*1000 equals 2 seconds. } //--> </script> <script language="JavaScript1.1"> <!-- // Browsers that support JavaScript 1.1 will replace the // earlier definition of doRedirect defined in the // JavaScript 1.0 code block. Make sure that this // definition appears after the 1.0 definition in the file. // function doRedirect() { // JavaScript 1.1 added the 'replace' function on the // location object so we can change locations without // adding to the browser's history. // window.location.replace( sTargetURL ); } // Just to be a bit fun -- we call the doRedirect function // directly here. This means that it is called before the // page fully loads. If your visitor is using a later // browser, then they will most likely not even see any of // "this" page at all. // doRedirect(); //--> </script> </head> <!-- Use the "onload" event to start the redirection process. --> <body onLoad="doRedirect()"> <!-- Provide a link that the user can click on just in case there is a problem with the other redirection methods. --> <p><center> <font face="arial, helvetica" size"-2">You are being redirected to the main page......<br> <a href="https://foo.com">foo.com</a></font> </center><p> </body> </html>http redirect to https
I'm using the SugarCRM Jumpbox and would like to see this functionality built into the Jumpbox as a configuration option instead of having to manually edit the Apache files.
http redirect to https
If you just want to easily make Joomla available over SSL only, then you should go to the SSL config page in the JumpBox admin portal (https://IPADDRESS:3000/) and enable "Use unique built-in certificate. (It just works.)"
It will be something like this:
http://wiki.jumpbox.com/doc/runtime/faq/configure_ssl_certificates
Except that you don't choose custom certificate, choose the built in option.
Austin
http redirect to https
I have a cert assigned. The problem is I need people automatically redirected to https://foo.com when they go to http://foo.com
Currently they end up on a JumpBox page that says:
"Joomla 1.5 has been configured to be accessed only over an encrypted connection (SSL). You can access Joomla 1.5 with the following link or by changing the begining of the URL in your browser from http to https."
http redirect to https
The JumpBox does not currently do that, as you have clearly discovered, we are continually looking into improvements along these lines so we may address that in the future.
We have some documentation about our apache configurations here:
http://wiki.jumpbox.com/doc/runtime/faq/apache_config
They may be useful to you. Though proceed with caution, as making apache configuration changes can break your JumpBox. You can either save config files before you change them or, worst case scenario, you could always look at a fresh JumpBox to see what the original config was.
Austin