I am running django on top of nginx with fastcgi.
When i do runfcgi, I am seeing these errors:
python manage.py runfcgi daemonize=false host=127.0.0.1 port=8000
WSGIServer: missing FastCGI param SERVER_NAME required by WSGI!
WSGIServer: missing FastCGI param SERVER_PORT required by WSGI!
WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI!
In my error log for nginx, I am seeing this:
2011/01/31 10:33:16 [error] 15921#0: *4 FastCGI sent in stderr: "WSGIServer: missing FastCGI param SERVER_NAME required by WSGI!
WSGIServer: missing FastCGI param SERVER_PORT required by WSGI!
WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI!" while reading upstream, client: ::1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "localhost"
2011/01/31 10:38:35 [error] 15921#0: *6 FastCGI sent in stderr: "WSGIServer: missing FastCGI param SERVER_NAME required by WSGI!
WSGIServer: missing FastCGI param SERVER_PORT required by WSGI!
WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI!" while reading upstream, client: ::1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host:
"localhost"
Everything works fine, but it's just that I do not want my error log to be flooded with these signals. I have seen solutions on apache which involves using .htaccess (which I don't think is really related anyhow), but I couldn't find anything that works on nginx yet.
Best Answer
Add to nginx location: