Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

having a little trouble migrating an old site to nginx...

Go to End

2 Posts   1163 Views


Community Member, 2 Posts

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



Community Member, 1 Post

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