• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Question Django parameters in Plesk/nginx

Matoons

New Pleskian
Hi,
I try to run a django app on a server (Ionos) with Plesk 18.0.34 on CentOS 8.2.2004
In "Apache & nginx Settings", I put nginx directives with proxy_pass 127.0.0.1:8000 but it doesn't work . See the detail below
When I run "manage.py runserver 0.0.0.0:8000", I can access my pages with my_domain:8000, but when I run "manage.py runserver" (127.0.0.1:8000), I get ERR_CONNECTION_REFUSED.
I had the port 8000 to the firewall, and I know that after that I will use gunicorn, and not use the dev version with "runserver".

Thanks for your help

Additional nginx directives :
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
if (!-f $request_filename) {
proxy_pass http://127.0.0.1:8000;
break;
}
}
 
Back
Top