Thomas is right, the resources he provides are excellent. You have to make
sure that DNS for domain1 and domain2 are pointing to your listener IP.
Sometimes I have seen ISPs or people forget to add in a record to have WWW
point to their IP as well.

If DNS is all correct and done and listening to the right IP then your basic
vhost configuration should look like this:

<VirtualHost 1.2.3.4:80 <http://1.2.3.4/>>
DocumentRoot /home/os/html/domain1
ServerName www.domain1.com
ServerAlias domain1.com
</VirtualHost>

<VirtualHost 1.2.3.4:80 <http://1.2.3.4/>>
DocumentRoot /home/os/html/domain2
ServerName www.domain2.co.uk
ServerAlias domain2.co.uk
</VirtualHost>



On 12/8/06, Luke Robinson <[EMAIL PROTECTED]> wrote:

Could somebody please take a look at this config - I have stripped it
down to something close to minimal.
No hits on domain1.com seem to reach the intended (first) VirtualHost
directive.
Hits on domain2.com reach the second VirtualHost only when not preceded
by www.
LogLevel debug doesn't help much.

Any help would be much appreciated.
Luke Robinson
---

ServerTokens Prod
ServerRoot /home/os/httpd
PidFile run/httpd.pid
Timeout 120
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15

LogLevel debug
ErrorLog logs/error_log

User os
Group os
UseCanonicalName Off
HostnameLookups Off
ServerSignature Off

Listen 80
NameVirtualHost 1.2.3.4:80

<VirtualHost 1.2.3.4:80>
DocumentRoot /home/os/html/domain1
ServerName www.domain1.com
</VirtualHost>

<VirtualHost 1.2.3.4:80>
DocumentRoot /home/os/html/domain2
ServerName www.domain2.co.uk
</VirtualHost>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to