How to host a php and node application

Posted September 24, 2020 573 views

Hey guys, I have never hosted a node application before but i have this website written in PHP and node. I used node and vue to create the admin panel page and the booking process. Is it possible to host this website with PHP and node

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi there @pujeremy27,

What you could do is use Nginx as a reverse proxy for your Node application and also use PHP FPM with Nginx for your PHP application.

What you could do is follow the steps here on how to setup Nginx with PHP-FPM:

And also you can follow this article on how to prepare your Node JS for production with Nginx:

Hope that this helps!

by Brennen Bearnes
Node.js is an open source JavaScript runtime environment for easily building server-side and networking applications. Node.js applications can be run at the command line but this guide focuses on running them as a service using PM2, so that they will automatically restart on reboot or failure, and can safely be used in a production environment.