Results 1 to 3 of 3

Thread: Apache2 default virtual server

  1. #1
    Join Date
    May 2008
    Location
    Auckland, New Zealand
    Beans
    69
    Distro
    Ubuntu 8.04 Hardy Heron

    Apache2 default virtual server

    Hi,

    I've set up a number of Apache2 virtual servers.

    In /etc/apache/sites-available I have
    a-sub-domain.domain.com
    domain.com

    "a-sub-domain.domain.com" is processed first so it becomes the default site for my ip address. i.e. request http://ip-address/ from a browser and I get a-sub-domain.domain.com

    I would like domain.com to be the default site for my ip address. Any ideas on how to do this with out changing the file names of my virtual host containers?

    Cheers

  2. #2
    Join Date
    Sep 2008
    Beans
    19
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Apache2 default virtual server

    botfish,

    try renaming the file to something like z-subdomain or moving the subdomain to the end of the file if you only use one file for domains.


    Brian

  3. #3
    Join Date
    Jun 2007
    Location
    Michigan, USA
    Beans
    465

    Re: Apache2 default virtual server

    Quote Originally Posted by brianhenson View Post
    botfish,

    try renaming the file to something like z-subdomain or moving the subdomain to the end of the file if you only use one file for domains.


    Brian
    That's what I did for my server. Move the one you want default to the top of the file, as the first entry.
    Ubuntu 14.04 Server
    -Linode 1GB
    Ubuntu Mate 16.04 Laptop
    -Toshiba Satellite A505-6005, Intel i3, 4.00 GB ram

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
  •