How to Ubuntu 18.04, Nginx, Flask, Uwsgi Python, and Fastcgi-php?

I have followed both these tutorials and they work fine.

How to serve flask applications with uswgi and nginx on ubuntu 18.04:

how to install linux nginx mysql lemp stack (on) ubuntu 18.04:

However I have an app which displays CSV files via PHP, and builds the CSV files (from XML files) in Python. The Python currently runs in Pycharm, and the PHP currently runs on the server.

I am trying to move the full app to a DO server, but I have no idea how I can get PHP files served by FastCGI, while Flask/Python is being handled by Uswgi.

Anyone have any idea, or tutorials, on how you can setup Python/Flask Uswgi, and FastCGI PHP on the same server. Ideally, having each serve its related files (.py or .php)

Thanks for any guidance.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer