I get this when accessing my domain: I see that my default template, http500 error django, is displayed.
I have a gunicorn setup:
command = '/usr/local/bin/gunicorn' logfile = "/home/ubuntu/virtualenv/myapp/error/gunicorn.log" loglevel = "info" pythonpath = '/home/ubuntu/virtualenv/myapp' bind = '127.0.0.1:8001' workers = 3
I have nginx config:
server { listen 80; server_name *.myapp.com; access_log /home/ubuntu/virtualenv/myapp/error/access.log; error_log /home/ubuntu/virtualenv/myapp/error/error.log warn; connection_pool_size 2048; fastcgi_buffer_size 4K; fastcgi_buffers 64 4k; root /home/ubuntu/virtualenv/myapp/homelaunch/; location /static/ { alias /home/ubuntu/virtualenv/myapp/homelaunch/static/;
settings.py
in the error_log of this nginx I see:
2013/10/25 00:31:49 [error] 1840#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: xx.xxx.xx.xxx, server: myapp.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8001/", host: "myapp.com"
in the access_log of this nginx configuration: see
xx.xxx.xx.xxx - - [25/Oct/2013:00:31:49 +0000] "GET / HTTP/1.1" 502 173 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0"
I already tried to read this problem and saw that I added:
fastcgi_buffer_size 4K; fastcgi_buffers 64 4k;
this can help nginx configuration, but it is not.
I'm a little confused about how I can debug this from here? Can anyone help?
Thanks.
Codetalk
source share