Question

Tutorial on LAMP and Nodejs setup?

Has anyone had any luck installing LAMP server then NodeJs? All my temps have fail with doing them both side by side. Trying to get NodeJS to work on port 3000 or even load up on the URL. https://mysitedomain.com:3000/ always gives me a url error or page wont load up. I have tryed the apache proxypass https and still it refuses to work.

Subscribe
Share

Submit an 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 started complately over and did the basic’s with this guide. Then after it was all setup I added php,mysql and phpmyadmin with .htaccess.

But my big question now is how can I upload a none nodejs project? without effect the nodejs server.

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04

@peopleandchat

When using Apache as a proxy to your NodeJS application, you should be proxying to the app on the IP and Port it’s running on and then access your domain without the port attached.

The purpose of using a proxy setup is to prevent the port from being required in the URL.

If, when you access your domain without the port attached, it’s still failing, please post the output of:

tail -20 /var/log/apache2/error.log

as well as your VirtualHost configuration so that we can take a look at it and see if there’s anything that’s causing it to fail.

To keep formatting in check, you can use the </> icon in the editor. That’ll allow you to post each piece in a code block.

@peopleandchat

I think that you should try to access your NodeJS app on this url http://mysitedomain.com/.

You are running apache as a reverse proxy and behind it you have your NodeJS app running on localhost that is why your url gives connection refused error.

Hope this helps, if it does not provide me with your apache configuration and the output of netstat -ltn | grep 3000 to make sure that your NodeJS app is running and the apache proxy is setup correctly.