Results 1 to 3 of 3

Thread: [SOLVED] Apache2 VirtualHosts not working

  1. #1
    Join Date
    Apr 2006
    Beans
    1,030
    Distro
    Ubuntu 9.10 Karmic Koala

    Arrow [SOLVED] Apache2 VirtualHosts not working

    Hi guys

    I did an upgrade from hardy to ibex at the weekend and everything seemed fine until I tried to view a couple of staged sites I have on this machine.

    The virtuall hosts havent been changed and all ppoint to the right locations, I checked the permissions hadent been changed on the folders and they are correctly owned and have read/write/execute (776 to be precise).

    I am running php5 and using mod_rewrite which are all enabled in the mods-enabled folder too.

    I have checked all the normal settings but this still doesn't display anything but the default "it works" file.

    Please help!

    Mike

  2. #2
    Join Date
    Apr 2006
    Beans
    1,030
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: [SOLVED] Apache2 VirtualHosts not working

    Sorted it myself:

    Added

    NameVirtualHost *:80

    to the top of all my old virtual hosts. It appears the newer version doesnt let you get away with not having this

    Mike

  3. #3
    Join Date
    Jul 2007
    Beans
    22

    Re: [SOLVED] Apache2 VirtualHosts not working

    My upgrade to Intrepid Ibex added a ports.conf to the apache files,
    containing the lines
    NameVirtualHost:80
    Listen 80

    (and some ssl stuff).

    this gave the error: [warn] NameVirtualHost *:80 has no VirtualHosts
    when I restarted apache, and sent all my pre-existing virtualhost entries to the default /var/www/ localhost location.

    My solution ended up being making the NameVirtualHost and default virtual host match port settings by:

    Stripping the :80 port reference from the NameVirtualHost *:80 line in ports.conf and also stripping the :80 port reference from the default virtual host <VirtualHost *:80> as well, so now both look like:

    NameVirtualHost *

    and ...

    <VirtualHost *>

    And now my other virtualhosts are working again.

    The launchpad bug for this is here:
    https://bugs.launchpad.net/ubuntu/+s...e2/+bug/268868
    Last edited by tchalvakspam; November 14th, 2008 at 07:31 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •