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!
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.
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.