1131 Posts in 1965 Topics by 402 members
|Go to End|
6 September 2012 at 4:20am
hey guys, haven't been here (or used silverstripe) in a while... v3. is looking pretty snazzy!!
Anyhoo, I was migrating a bunch of sites from an old apache server onto a new nginx one, and I'm having heaps of trouble with this silverstripe site...
- Some assets are redirecting to https:// urls, so none of my styles are loading..
- the site loads /really/ slowly.. like, it takes up to a minute. sometimes not loading at all
- I can't seem to access the login page...
I've open-sourced the whole project (incl db & nginx config) so if anyone can take a quick peek and maybe point me in the right direction I'd be very appreciative!!
4 October 2012 at 5:30am
I had the same problem.
I found that silverstripe checks the following to detect SSL
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off')
However in nginx HTTPS server header was set to empty string and not on as it is in apache.
I did not have much time to research why nginx behaves this way and if it is more correct, but I ended up changing the above line to this
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on')
I had to change it in a few places
Hope this helps
|Go to Top|