Virtual Directorys in apache, HELP!

i3rYs0n

Golden Member
Dec 9, 2001
1,525
0
0
OK, i have this

NameVirtualHost last.cc

<VirtualHost last.cc>
ServerAdmin bryson@last.cc
DocumentRoot /www/docs/last.cc
ServerName last.com
ErrorLog logs/last.cc-error_log
CustomLog logs/last.cc-access_log common
</VirtualHost>

NameVirtualHost ch4t

<VirtualHost ch4t>
ServerAdmin bryson@ch4t.last.cc
DocumentRoot /www/docs/ch4t.last.cc
ServerName ch4t.last.com
ErrorLog logs/ch4t-error_log
CustomLog logs/ch4t-access_log common
</VirtualHost>

1) What do i need to add to get this to work?
2) Is the root right?
I have the last.cc files in the htdocs folder and the ch4t
files in a folder called ch4t.
3) When i test it is comes up that it cannot resolve host name ch4t, so how do i make it resolve it?

Thx for anyhelp,
Bryson

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
If it can't resolve the name you have a DNS problem, not apache.

But I also think you need to give the NameVirtualHost and VirtualHost directives the IP address, not the hostname, that they're a vhost on.
 

kt

Diamond Member
Apr 1, 2000
6,032
1,348
136
Nothinman is right. The VirtualHost and NameVirtualHost directives take IP address, not name address.

ie:

NameVirtualHost 123.123.123.123

<VirtualHost 123.123.123.123>
 

i3rYs0n

Golden Member
Dec 9, 2001
1,525
0
0
alright, i changed they name to an IP address, now it says that the ip has no virtual hosts, and that the root folder doesn't exist

Can anyone help on these two things?

Bryson