PDA

View Full Version : default virtual host


jmroth
17th September 2005, 21:02
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?
Regards,
~jm

till
17th September 2005, 21:10
Hi,

please have a look at this thread:

http://www.howtoforge.com/forums/showthread.php?t=588

Till

jmroth
17th September 2005, 21:24
Yes, I have seen that but it is not a clean solution and Apache complains:

[error] VirtualHost 1.2.3.4:0 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results

till
17th September 2005, 21:29
Yes, I have seen that but it is not a clean solution and Apache complains:

[error] VirtualHost 1.2.3.4:0 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results

Then add:

<VirtualHost 192.168.0.1:80>
ServerAdmin webmaster@yourdomain.com
DocumentRoot /path/to/your/company/website/
</VirtualHost>