By craig198396
I followed this tut to get virtual hosts up and running on the default DO LAMP stack. So far, so good. https://www.digitalocean.com/community/articles/how-to-set-up-apache-virtual-hosts-on-ubuntu-12-04-lts
When I visit my IP address in a browser, I see all the domains associated with the droplet. It’d be nice (and potentially more secure?) to have that data hidden away from public view. Is this possible, and what’s the best way to go about it?
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!
You should not create domain root directories in /var/www <br>but should use more secure location. like <br> <br>/home/user/domains/domain1.com <br>/home/user/domains/domain2.com <br>/home/user/domains/domain3.com <br>
You can either add an empty index.html file in /var/www or set apache’s virtualhost’s DocumentRoot to /var/www/default: <br> <br><pre>nano /etc/apache2/sites-enabled/000-default</pre> <br>Edit DocumentRoot and set it to /var/www/default. <br> <br>Create /var/www/default: <br><pre>mkdir /var/www/default</pre> <br> <br>Finally, create an empty file in it: <br><pre>touch /var/www/default/index.html<pre> <br> <br>Make sure you restart Apache.
@chemical.sweet - Care to expand on the potential security risk it could have? I’m following https://www.digitalocean.com/community/articles/how-to-set-up-apache-virtual-hosts-on-ubuntu-12-04-lts which I assume has some kind of ‘best practise’ thinking behind it. <br> <br>@Kamal - Thanks for a useful answer.
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.