By Eric
I just setup my droplet as a virtual host (LAMP + Ubuntu) and successfully added 5 websites! win! However, it seems to have chosen one of the five as the default when I visit my IP address directly. Is there a way to specify which site inside of /var/www/ the IP should default to?
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!
Accepted Answer
Look for the VirtualHost blocks in /etc/apache2/sites-enabled that you want to set as the default. Make the following change(s)
<VirtualHost *:80> or <VirtualHost *:443>
to
<VirtualHost _default_:80> or <VirtualHost _default_:443>
Make sure only one virtual host block is assigned the default (max one default per port). As you may already know, http URLs are usually assigned to port 80 and https URLs to port 443.
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.