Is it possible to have multiple domains on one droplet/server? For example a .net domain, two .no domain ? I have searched and read some questions here, but I dont get my question answered fully. I reckon it is done by using virtual hosts, and I reckon one of the domains need to be the major domain?
Thanks in advance
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!
Yes it is possible. You can read about it here https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-debian-7
Short of the long is… Drop stuff like this at the end of /etc/httpd/conf/httpd.conf
create folders for your html files / site files… mkdir /var/www/html/site1.com mkdir /var/www/html/site2com
<VirtualHost *:80> DocumentRoot “/var/www/html/site1.com” ServerName site1.com ServerAlias www.site1.com <Directory “/var/www/html/site1.com”> AllowOverride all allow from all Options +Indexes </Directory> </VirtualHost>
<VirtualHost *:80> DocumentRoot “/var/www/html/site2.com” ServerName site2.com ServerAlias www.site2.com <Directory “/var/www/html/site2.com”> AllowOverride all allow from all Options +Indexes </Directory> </VirtualHost>
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.