default virtual host

Discussion in 'Installation/Configuration' started by jmroth, Sep 17, 2005.

  1. jmroth

    jmroth New Member

    Hi there,
    once I specify a NameVirtualHost directive for an IP address, such as ispconfig does for each IP there is a site for, I would like to be able to specify which virtualhost is used if the IP is accessed directly.
    As far as I know this can only be done by specifying the order in which virtualhosts are listed in apache's config file. I.e. the first virtualhost listed for that IP is the one that is displayed if the IP address is accessed directly. In ISPConfig's terms this is the last site added for that IP, if I understand correctly how it is done in ispconfig.
    Now my question: can I edit the file manually and change the order of VirtualHosts without confusing ISPConfig or would it cause a lot of trouble to implement a default VirtualHost in ISPConfig?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. jmroth

    jmroth New Member

    Yes, I have seen that but it is not a clean solution and Apache complains:

    [error] VirtualHost -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Then add:

    ServerAdmin [email protected]
    DocumentRoot /path/to/your/company/website/

Share This Page