Hi,
I was wondering could a single droplet support multiple sites? What is the best practice here?
Thanks,
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.
Definitely! You can host as many sites as you want on a single droplet.
Simply point all of your domains/subdomains to your droplet’s IP address. Your webserver will take care of the rest.
It doesn’t matter – you can use whichever you prefer :)
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 updateDocumentRoot
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:Repeat that for every Laravel app you want to host.