Welcome Guest. Please Login or Register  

You are here: Index > Webuzo > General Support > Topic : Nginx as reverse proxy for WSGI server

Normal Mode | Print  

 Nginx as reverse proxy for WSGI server (5 Replies, Read 3392 times)
Group: Member
Post Group: Working Newbie
Posts: 63

I'm failing to install a Python test app in a subdomain, the Webuzo way.

The WSGI server (Gunicorn) listens on (later on Unix socket, but like this for the moment) as service. This test below well returns the Python computed page.
curl localhost:8000

Then, I add this conf file in Webuzo > Extra Configuration, selecting the right subdomain (matching the right server block):
# pass requests to wsgi server
location / {
    proxy_pass http://localhost:8000;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;

I restarted the nginx service, in case. I also placed a dummy static index.html in public root of the concerned subdomain to see what is reached.

But visiting the URL, I still reach the static index from Nginx. Doing the same from the inside using curl gives the same result...

So, Is it the right way to add this location block in Webuzo?
Let me know.

Context: OpenVZ VPS, CentOS 7, Webuzo Premium

OpenVZ VPS, CentOS 7, Webuzo Premium / Desktop and full-stack dev w/ C, C++, Python, Perl, javascript...
IP: --   

 erile   Nginx as reverse proxy for WSGI server (5 Replies, Read 3392 times)
    |--  erile   Hmm, I suspect...   on August 4, 2019, 8:50 pm
    |--  erile   This weird effect...   on August 4, 2019, 9:05 pm
    |--  erile   Some news: I...   on August 5, 2019, 12:12 am
    |--  erile   UPDATE: I have...   on August 5, 2019, 12:45 am
    |--  erile   OK, Solved with...   on August 5, 2019, 11:16 am

« Previous    Next »

Normal Mode | Print  

Users viewing this topic
1 guests, 0 users.

All times are GMT. The time now is April 14, 2021, 1:40 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:1.472