default vhost

Discussion in 'Installation/Configuration' started by 8omas, Mar 22, 2011.

  1. 8omas

    8omas Member HowtoForge Supporter

    I read a lot of post in here about setting the default vhost file of apache but I cannot conclude to anything specific.
    So I did this:
    I renamed the default file to default.old (in case I need it later) in /etc/apache2/sites-available and I made a symlink of one of my vhost (eg xyz.com.vhost) to default. (ln -s xyz.com.vhost default)

    Now I have the default vhost that I want (and not the first available when someone try to access by ip or by unknown subdomain), but I don't know if the above action interfere somehow with ISPConfig.

    Does the ISPConfig uses the default vhost (the default file) for some particular reason?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    It is used for webmail and phpmyadmin. Changing the default vhost might disable webmail and phpmyadmin and all other webbased software that you might have installed with the package manager of your linux distribution.
     
  3. 8omas

    8omas Member HowtoForge Supporter

    Ok. So which is the best way to define the default vhost?
    For the record, with the above change, I have no problem with webmail and phpmyadmin. I did the change after I have installed them
     
  4. 8omas

    8omas Member HowtoForge Supporter

    I followed your advice and left default untouched.

    The trick I did is to make a symbolic link to my desired host:
    Code:
    ln -s /etc/apache2/sites-enabled/001-mydesired.vhost /etc/apache2/sites-enabled/mydesired.vhost
    This vhost comes first and after the 000-default and 000-ispconfig
     

Share This Page