Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hi everyone 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.

share|improve this question

1 Answer 1

up vote 7 down vote accepted

Add to nginx location:

fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.