PDA

View Full Version : [ubuntu] Apache Virtual Hosts - disable default



mcc28x
August 15th, 2012, 07:20 PM
Hi,

I have created 3 virtual hosts e.g. /etc/apache2/sites-available/mynewsite and used a2ensite and restarted apache. I can browse to the site no problem.

I want to disable the default site /etc/apache2/sites-available/default but when I issue a2dissite default and restart apache none of the virtual hosts can be accessed either?

How do I do this?

cheers

Mark

Habitual
August 16th, 2012, 02:44 PM
n/m

SeijiSensei
August 16th, 2012, 04:51 PM
You need to have some virtual host that will handle requests that don't match a name-based virtual host. Trust me, you'll see requests in your server logs for requests against your server IP, for instance, from machines trying to find holes in your configuration. Just leave the default there to give requests like these the "It Works!" page.

Wim Sturkenboom
August 16th, 2012, 07:09 PM
I've created my own default page that simply contains urls to the other sites.

mcc28x
August 16th, 2012, 07:40 PM
Okie dokie, cheers