• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

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