How to Run Flask Based Web Page on Ubuntu Server Which Already Serving PHP Website

Solution
location /flaskbasedapp {
    try_files $uri @flask;
}

location @flask {
    uwsgi_pass unix:/path/to/uwsgi/socket-file.sock;
    include uwsgi_params;
}