On Thu, Nov 18, 2010 at 16:17:03 +0200, lilit-aibolit wrote: > I check httpd.conf and can't find another NameVirtualHost *:80 directive, > and another files with that directive. > but I have commented > #DocumentRoot "/var/www/htdocs" > and > #ServerName xxx.com.ua > directives and nothing change in httpd-U output command.
FWIW, you need exactly one NameVirtualHosts directive with either an ip address, hostname, or wildcard. Depending on what you want, you can either configure an ip-based virtual host, or a name-based virtual host setup. Each one is explained here: http://httpd.apache.org/docs/1.3/vhosts/ip-based.html http://httpd.apache.org/docs/1.3/vhosts/name-based.html Here is an ip-based example: NameVirtualHost 10.0.0.1:80 <VirtualHost 10.0.0.1:80> ServerName www.example.com ServerAlias example.com ServerAdmin [email protected] DocumentRoot /htdocs/www.example.com/ </VirtualHost> <VirtualHost 10.0.0.1:80> ServerName www.another-example.com ServerAlias another-example.com ServerAdmin [email protected] DocumentRoot /htdocs/www.another-example.com/ </VirtualHost> Then if you type in the www.example.com in the browser, you'll reach /htdocs/www.example.com and if you type www.another-example.com in the browser you'll reach /htdocs/www.another-example.com. HTH, Daniel -- LIVAI Daniel PGP key ID = 0x83B63A8F Key fingerprint = DBEC C66B A47A DFA2 792D 650C C69B BE4C 83B6 3A8F

