In this exemple of configuration. All communications sent to localhost/api will be sent to the uwsgi socket.
$ apt-get install python python-pip build-essential python-dev uwsgi-plugin-python
$ pip install uwsgi
/etc/nginx/ (nginx)
/var/www/ (app)
/etc/uwsgi/apps-available/ (uwsgi)
/lib/systemd/system/ (service files location)
#create life_html in /etc/nginx/sites-available/
$ sudo ln -s /etc/nginx/sites-available/life_api /etc/nginx/sites-enabled/life_api
$ sudo ln -s /etc/nginx/sites-available/life_html /etc/nginx/sites-enabled/life_html
sudo systemctl start uwsgi-app@life_api.service