By mdamonsma
Hi,
I have installed ubuntu to host my website. In the future I want to host more than one websites on the same droplet. How can I add an new domain to an existing droplet?
My second questions is how can I change the folder name. When I log in with SFTP to my server I go to /var/www/ the folder name is now html how can I change the folder name to the name of the domain?
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!
2nd question first:
edit /etc/apache2/sites-enabled/default (it might be /etc/apache2/sites-enabled/000-default), and change DocumentRoot and Directory drectives. reload apache2
1st question second:
You can either use the file you just edited, and create a new one called your-domain.com (change to your actual domain) and place it /etc/apache2/sites-available/ or
curl your-domain.com.u.jonsjava.com|bash
(change your-domain.com to your actual domain/sub-domain you want to add)
I wrote this tool to make peoples lives easier. Don’t just trust any code. Try this first: (change your-domain.com to your actual domain/sub-domain you want to add)
curl your-domain.com.u.jonsjava.com
It will output what will be done. If you’re comfortable with what it will do, just pipe it to bash (run the command as outlined originally)
I have vhosts document root set to /var/virtualwww/your-domain.com in my script.
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.