I use Digital Ocean about one year. I want create a a service to sell small websites using WordPress as CMS, alright a simple service/panel using Digital Ocean API to create a new domain in apache, database and some configurations.
But I have a HUUUGGGGEEEE question, how create isolated configuration for each domain? Example: Imagine one of this small website infected or hacked. This will create a huge problem for all users.
Exists any tool, to deny one user/website to access other directories/files from other user/website?
== My scenario
1 Droplet to MySQL 1 Droplet to Apache/PHP 1 Droplet to Webmail Domains
*Apache (virtual sever) and MySQL databases are created by API
Directories structure
/var/www/domain1.com/[website files]
/var/www/domain2.com/[website files]
/var/www/domain3.com/[website files]
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.
Hello,
With the DigitalOcean API you could, for example, create separate droplets:
https://developers.digitalocean.com/documentation/v2/#droplets
But once the droplet is created you would need your own automation in order to make changes to your Apache config. For example, you could use Ansible or BASH scripts to automate the creation of Apache Virtual Hosts.
Here’s a step by step guide on how to host multiple websites on 1 droplet with Apache Vhosts:
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04
Hope that this helps! Regards, Bobby
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.
Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.
