Report this

What is the reason for this report?

Can or should I install multiple sites on one droplet?

Posted on July 31, 2014

Hi,

I was wondering could a single droplet support multiple sites? What is the best practice here?

  • If so how can I setup the dns?
  • Should I be looking at Nginx over apache?
  • I have no Nginx experience but the idea is to use my droplets as a testing ground to ultimately deploy Laravel sites.

Thanks,



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 was wondering could a single droplet support multiple sites?

Definitely! You can host as many sites as you want on a single droplet.

If so how can I setup the dns?

Simply point all of your domains/subdomains to your droplet’s IP address. Your webserver will take care of the rest.

Should I be looking at Nginx over apache?

It doesn’t matter – you can use whichever you prefer :)

I have no Nginx experience but the idea is to use my droplets as a testing ground to ultimately deploy Laravel sites.

See How To Set Up Apache Virtual Hosts on Ubuntu 14.04 LTS. You’ll need to create a VirtualHost for each separate Laravel app you want to deploy.

Then, upload your Laravel app to /var/www/domain.com/public_html, and update DocumentRoot in your VirtualHost config to point to /var/www/domain.com/public_html/public.

Finally, you’ll need to allow Laravel to write to /var/www/domain.com/public_html/storage. You can do that by executing the folllowing commands:

sudo chgrp -R www-data /var/www/domain.com/public_html/storage
sudo chmod -R g+w www-data /var/www/domain.com/public_html/storage

Repeat that for every Laravel app you want to host.

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.