Welcome! Log In Create A New Profile

Advanced

Re: Two python app, uwsgi, one IP, nginx

Sergey A. Osokin
November 21, 2022 08:28AM
Hi there,

On Mon, Nov 21, 2022 at 06:20:33AM -0500, mfaridi wrote:
> We have one server and we have two python app work by uwsgi and we want use
> Nginx for serve these applications and other users can use these two python
> applications.
>
> these two python application start on server by this command
>
> /home/admin/aaa/aaa_en//bin/uwsgi --ini aaa.ini
> and
> /home/admin/bbb/bbb_env/bin/uwsgi --ini bbb.ini
>
> I want bbb application use port 8888 and aaa application use port 7777

Here's the minimal configuration for two virtual servers configure on
ports 7777 and 8888:

server {
listen 7777;

location / {
uwsgi_pass http://ip_address_of_aaa:port_of_aaa;
}
}

server {
listen 8888;

location / {
uwsgi_pass http://ip_address_of_aaa:port_of_bbb;
}
}

Please take a look on the ngx_http_uwsgi module directives at
http://nginx.org/en/docs/http/ngx_http_uwsgi_module.html

Thank you.

--
Sergey A. Osokin
_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

Two python app, uwsgi, one IP, nginx

mfaridi November 21, 2022 06:20AM

Re: Two python app, uwsgi, one IP, nginx

Sergey A. Osokin November 21, 2022 08:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 82
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready