Report this

What is the reason for this report?

Is it possible to run a PHP website and a Node.js app on the same server?

Posted on March 1, 2014

I have some old websites that are either running on Wordpress or otherwise using PHP that I would like to start migrating over to DigitalOcean soon. I would like to run this on a LEMP stack. I will also be building some Node.js apps in the near future.

I am coming from shared hosting so I am still learning how to manage my own server. Is it possible to run both my PHP websites and Node.js apps on the same server or would they need to be separate? If it is possible, can someone point me in the right direction on how it would be done?



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!

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.

I’m in the same situation at the moment. Migrating from a shared hosting to DigitalOcean. <br> <br>I’ve done so far: <br>- Create Droplet (CentOS instead of Ubuntu) <br>- Installed LEMP (Using the tutorials found here) <br> <br>Now I want to try setting up Nginx to have ‘Virtual host’ for different website. Currently stuck with deciding setting up different users for best practice rather than using root when setting up everything. <br> <br>What is your user setup? Did you just created an alternative root user with the same permission as group as root? <br>

You can have both without problem. I am doing it myself (my site is PHP) and my blog is nodeJS (ghost). <br>@bahit.hamid IMO it really depends of the tyoe of sites your are hosting. Its definetely more secure to have one user per site, mostly if your users have access to the server via FTP or something. If you are the only user with server access I think you can run all sites with the same user.

I would really like to know this as well.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.