React + Laravel Deployment

Hello,

I followed this tutorial to install NodeJS on HestiaCP. It generated (1) nodeapp, and (2) public_html folder.

I have a React + Laravel web app. React acts as the front-end, and Laravel acts as the back-end. I run this on my Windows machine perfectly with Cloudflare Tunnel. But now, I want it to be put on my HestiaCP installed on an Oracle Cloud VPS running Ubuntu 22.04 ARM64.

React Folder
$ npm start

Laravel Folder
$ php artisan serve --host localhost --port 3001

I put the React folder in the nodeapp folder, and the Laravel folder on public_html folder.

Unfortunately, Cloudflare responded to 502 Bad Gateway. Is there any workaround to make it run perfectly?

Thank you.

Create an nginx template that connects to port 3001…

https://docs.hestiacp.com/admin_docs/web.html#how-do-web-templates-work