Hi I’ve installed gunicorn, django and nginx as described in this tutorial Tutorial. I’ve developed a function in django that add in my database an user and it works perfectly!!
Now I’ve installed CSF (Config Server Firewall) and if I run it csf -r
, the same function for adding a user doesn’t work.
I see, in the error log of Nginx, this raw:
2014/06/25 10:11:04 [error] 5396#0: *19 upstream prematurely closed connection while reading response header from upstream, client: 79.35.50.121, server: localjob.it, request: POST /django/registerClient HTTP/1.1, upstream: http://188.226.199.19:8001/django/registerClient, host: 188.226.199.19
I underline that the function work without star csf. Anyone can explain me why I get this problem?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Doesn’t work!!
Underlining that the url of the function is http://188.226.199.19/django/registerClient
My nginx configuration is something like this:
What does your Nginx configuration look like? It sounds like you are using something like this for your proxy pass:
Since you’ve set up a firewall that is blocking port 8001, you need to make sure you are accessing it on the local host. So you want something like:
You could also edit
/etc/csf/csf.conf
and add port 8001 to bothTCP_IN
andTCP_OUT