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 2884 times)
erile
Group: Member
Post Group: Working Newbie
Posts: 62
Status:
Hello,

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

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

Then, I add this conf file in Webuzo > Extra Configuration, selecting the right subdomain (matching the right server block):
Code
# 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.
TIA

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: --   


Threads
 erile   Nginx as reverse proxy for WSGI server (5 Replies, Read 2884 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 October 30, 2020, 10:28 am.

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