Running node, PHP and Python on the same vps -


is there rational way serve multiple websites via php:nginx, python:??? & node.js on same vps? , would reliable?

the sites expected low in traffic. have php running on nginx, ubuntu via digital ocean , stick nginx php , major webserver python.

the kind of setup you're describing straightforward , not complicated. nginx works fine reverse proxy , web server handles serving static assets.

  • for php, need proxy php-fpm (running on tcp port or unix socket).
  • for python, need wsgi server (something uwsgi or gunicorn, again using tcp port or unix socket) server python app , have ngix proxy requests it.
  • for node.js app, run node server on port 8000 , have nginx proxy requests it.

if have bunch of websites, each should have server block matching unique server name (i.e. mapped virtual host).

the setup reliable backend services (like php-fpm, wsgi, , node.js server). long services , running (as daemon services) nginx should have no problem proxying them. have used 3 setups on 1 server , have never experienced problems of above.