5

my problem: If I attempt to access a https template through expression engine, I get a blank screen:

https://secure.domainname.com/anyTemplateGroup/anyTemplate

Solved by host (finally found this on their website, their support desk never mentioned it!)

https://secure.domainname.com You can use a different prefix, eg "www." or "store."

Solution: I will get host to change prefix to www.

Thanks everyone!


Just in case anyone comes across this problem, here are some details of what was going on:

FACT 1: The EE site url is as follows, and I can access all my templates like a normal site.

http://www.domainname.com

FACT 2: I have an SSL certificate installed and my host provides access using https and a prefix, but 'secure' is not a subdomain, it just points to files in the same path as http://www.domainname.com:

https://secure.domainname.com

FACT 3: Within the site I have a few forms that I'd like to make secure using SSL such as:

http://www.domainname.com/login

FACT 4: But with my host the above URL needs to be:

https://secure.domainname.com/login

FACT 5: Im using Focus Lab, LLC Master Config, so my config file reads as:

$protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://';
$base_url = $protocol . $_SERVER['HTTP_HOST'];
$env_config['base_url'] = $base_url . '/';
$env_config['site_url'] = $env_config['base_url'];

FACT/CLUE 6: If I disable EE's htaccess in the root off the www folder, I can launch a test file located at www/test/phpinfo.php as, but this is not what I want, as this is not an EE page, just something created in dreamweaver:

https://secure.domainname.com.au/test/phpinfo.php

FACT/CLUE 7: With htaccess enabled again I cannot access the above file (I get blank screen), but I can access it via:

http://www.domainname.com/test/phpinfo.php

POSSIBLE CAUSE OF ISSUE I looked at changing values in the config and htaccess, but nothing has given me access to the EE template via https. The main problem appears to be with the prefix secure Other users of EE + https do not appear to have the 'secure' prefix as part of URL, but someone must know how to overcome.

Thanks, Lloyd

  • have you checked site_url in index.php (https) and does a simple php file work (something like phpinfo())? – GDmac Mar 27 '13 at 7:49
  • EE is installed at www.domainname.com. I can load any file outside of EE using the SSL certificate at, for example, secure.domainname.com/test/file.txt. Secure is not a subdomain, it's just a prefix my host has appended as part of the SSL certificate setup. So the above test directory is located at www.domainname.com/test/file.txt. So the issue is with the path defined in EE (I think). – Lloyd Hill Mar 27 '13 at 9:56
  • Does your host not allow you to install the SSL certificate directly on www.domainname.com.au? That would be the preferable solution, and if they don't allow that, I would find a new host. – Adrian Macneil Mar 27 '13 at 12:17
3

Is https://secure.domainname.com the actual place where EE is installed? You'll need to install it in this 'secure' subdirectory and ensure that all paths within the system are correctly pointing to this location on the server.

| improve this answer | |
  • That will be the problem then. SSL certificates are specific in that they're applied to an exact domain or subdomain. Your host may have misunderstood what you wanted and applied it to a new subdomain. So unless you have EE installed on that subdomain you wont be able to make a secure connection. Even if you setup a redirect in your .htaccess file it still wouldn't be connecting securely and would throw warnings. You either need to tell your host to configure the SSL certifcate on your root domain or install EE on secure.domainname.com. – Ian Mar 27 '13 at 10:06
  • No, the SSL is installed to the www directory, which is also where EE is installed. There is no subdomain called 'secure'. The SSL certificate will only work for files in the www folder (root domain). – Lloyd Hill Mar 27 '13 at 10:22
  • I'm confused. Why have you made mention of secure.domainname.com if that doesn't exist? – Ian Mar 27 '13 at 12:54
  • Glad you got it sorted. Don't let the hosts fob you off with a subdomain unless you specify you want it. It is always an option to get a wildcard SSL certificate which would apply to any subdomain too but that will be more expensive. – Ian Mar 27 '13 at 19:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.