1042 Posts in 379 Topics by 372 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 380 Views |
-
having a little trouble migrating an old site to nginx...

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!!
Thanks,
Dean.http://schoolandcommunitymusic.com.au
https://github.com/deanrather/scm-website -
Re: having a little trouble migrating an old site to nginx...

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
/sapphire/core/HTTP.php
/sapphire/core/control/Director.php
/sapphire/main.phpHope this helps
yavor
| 380 Views | ||
|
Page:
1
|
Go to Top |


