0

I recently configured an (Ubuntu 14.04) server to use static IP addresses and noticed that: <Virtualhost *:80>

No longer seems to work. Previously the 000-default.conf file was used and by modifying it and adding each IP to the declaration it works again. But I'd rather be able to use a wildcard here and elsewhere if possible.

Most of the hosts I have configured are now explicitly stating which IP address(es) they correspond to, is there a way to configure apache so that the default (or any) virtual host configuration that will be used for any and all hostnames which don't have a match using a wildcard?

Eaten by a Grue
  • 282
  • 4
  • 22
  • I've always used `` for that. The documentation seems to suggest, that it still is available in 2.4 (http://httpd.apache.org/docs/current/vhosts/examples.html#default). Have you tried that? – r_3 Dec 01 '14 at 19:01
  • It's supposed to be: `` – r_3 Dec 02 '14 at 11:19
  • Earlier in that same docs page it's illustrated that the first vhost `` in the config will be used if no others match. This only stopped working for me when I configured static IPs. – Eaten by a Grue Dec 02 '14 at 12:21

1 Answers1

0

In your main httpd.conf you want your "Listen" directive to be

Listen 80  

then you should have each virtual begin with:

<VirtualHost *>

that's how I have apache 2.4 on Ubuntu 12 working

user16081-JoeT
  • 1,950
  • 11
  • 18
  • As far as I know Apache 2.4 is not officially supported on Ubuntu 12. In any event, `Listen 80` is already there by default in ports.conf and using wildcards no longer seems to work in virtual hosts. Are you using DHCP or static IP configuration? – Eaten by a Grue Nov 29 '14 at 08:55
  • static ip, the wildcard seems to work on my virtual host - I could do some further testing if it's not working for you...? – user16081-JoeT Nov 30 '14 at 00:38