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!!
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