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 config my NGINX server these applications
I want bbb application use port 8888 and aaa application use port 7777
right now uwsi server these applications and I want ngnx server these
applications
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,295844,295844#msg-295844
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