I have a development directory (/build) and a public directory (/public) how do I serve the public directory as the home?
I don’t want to have to do a re-direct or obviously serve the site on http://www.mysite.io/site/public
Any thoughts I can’t find anything?
P.S I am not using any stack, I don’t think I need apache (even though I think it’s installed already) or php. This is a node.js app and I think I may eventually run this on port 3000, and eventually need to figure out how to serve that on port 80 instead.
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!
Hi Michael, <br> <br>There are a number of ways that you can accomplish this. I’d suggest serving your site with Nginx. This article should set you on the right path: <br> <br>https://www.digitalocean.com/community/articles/how-to-host-multiple-node-js-applications-on-a-single-vps-with-nginx-forever-and-crontab <br> <br>If the node.js app is going to run on port 3000, your Nginx configuration could be as simple as: <br> <br>server { <br> listen 80; <br> <br> server_name your-domain.com; <br> <br> location / { <br> proxy_pass http://localhost:3000; <br> proxy_http_version 1.1; <br> proxy_set_header Upgrade $http_upgrade; <br> proxy_set_header Connection ‘upgrade’; <br> proxy_set_header Host $host; <br> proxy_cache_bypass $http_upgrade; <br> } <br>}
Ah nice, I was just reading into that I came across this https://www.digitalocean.com/community/articles/how-to-install-laravel-with-nginx-on-an-ubuntu-12-04-lts-vps and I figured I probably need to be running on apache or nginx. <br> <br>Thanks!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.