(it's almost exactly what is in there, barring of course the change in the root parameter since I'm using /var/www/yiiapp/htdocs)
however, when I raise an exception using e.g.
throw new CHttpException(406, print_r("Error found", true));
I get a 502 bad gateway error on the nginx side.
Looking in /var/log/nginx/error.log, I see this sort of error:
2013/09/26 15:59:47 [error] 6906#0: *104 upstream sent invalid status "CHttpException" while reading response header from upstream, client: 10.25.3.231, server: , request: "GET /index.php?r=modulename/update&id=3009 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "10.0.0.42", referrer: "http: //10.0.0.42/index.php?r=modulename/index"
I can't find any references at all, when I google for ChttpException and nginx, so I must be doing something very wrong here?
NB: I can't post embedded links, so that http:<space>//10.0.0.42... <space> is not supposed to be there, in case anybody thinks my URL is incorrect.