Score:1

Disable default virtual host in apache

pk flag

I've configured my name-based virtual hosts for Apache2 as follows:

  1. copied /etc/var/apache2/sites-available/000-default.conf to /etc/var/apache2/sites-available/mysite.com.conf

  2. edited ServerName, ServerAlias and DocumentRoot in mysite.com.conf

  3. a2ensite mysite.com

Repeat step 1-3 for my nth site.

That works. But if I browse to the server's ip-address directly I get directed to 000-default. If I a2dissite that file, it takes the first of my custom config files and redirects to the according www-folder. I don't want that. I want that someone putting my server's IP address in the browser gets either an error message or nothing at all. How can I achieve that?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.