Back to basics - apache?

I’ve just created a droplet and am basically unsure what to do next. I’ve got the Node server up and running with mysql, can access everything remotely but, what now?

Do I need to install Apache? I would have presumed that would have been done but I cannot access the site by IP address so I guess not.

Where do my files go? Which folder resolves as web root?

Is there a full on tutorial anywhere that gives a start to finish example?

Many thanks

Submit an answer

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!

Sign In or Sign Up to Answer

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.


When it comes to NodeJS, most applications run on non-standard ports, such as 3000 (for example), so without a web server running in front to proxy the requests on port 80 to the application running on port 3000, the only way to access the application will be by appending the port to the end of the domain or IP address.

If you go the NGINX route (which is what I’d recommend), check my comment here for a working example of how to setup a server block for NGINX to proxy requests to your NodeJS application:

Where to go next depends on what you want and what you have. You mentioned Node server, if your app is based on Node.js, I can recommend taking few additional steps to get it ready for production. How To Set Up a Node.js Application for Production on Ubuntu 16.04 will explain you how. This will also setup you Nginx, which is used to proxy app (explained in tutorial).

For files if you have Node app, put it anywhere you want, even home directory will do the job.

If you’re not based on Node, and you have Web site you want to serve, you will have to install Apache or Nginx manually and put your files in /var/www/html. One of following two tutorials will help you: How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 16.04 How To Install Linux, Nginx, MySQL, PHP (LEMP stack) in Ubuntu 16.04.

Choose whatever you like more, or have more experience with. First is based on Apache, while second is based on Nginx.

This comment has been deleted