Problem Description
I am working with configuring Django project with Nginx and Gunicorn.
While I am accessing my port `gunicorn mysite.wsgi:application --bind=127.0.0.1:8001` in Nginx server, I am getting the following error in my error log file;
> 2014/05/30 11:59:42 [crit] 4075#0: *6 connect() to 127.0.0.1:8001 failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: `"http://127.0.0.1:8001/"`, host: "localhost:8080"
Below is the content of my `nginx.conf` file;
server {
listen 8080;
server_name localhost;
access_log /var/log/nginx/example.log;
error_log /var/log/nginx/example.error.log;
location / {
proxy_pass http://127.0.0.1:8001;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
}
}
In the HTML page I am getting `502 Bad Gateway`.
What mistake am I doing?
AI-Generated Solution
Powered by LMSouq AI · GPT-4.1-mini
Analyzing problem and generating solution…
Was this solution helpful?