I configured my own local server on Windows which contains binary versions of Apache, PHP and MySQL. Apache works fine with localhost. But now I would like to configure Virtual hosts so I changed the <Directory "D:/Server/localhost"> opening tag to <Directory "/"> in my httpd.conf and added into the file after the ended tag </Directory> the following

NameVirtualHost *
<VirtualHost *>
    ServerName localhost
    DocumentRoot "D:/Server/localhost"
</VirtualHost>

<VirtualHost *>
    ServerName localhost_static
    DocumentRoot "D:/Server/localhost_static"
</VirtualHost>

and restarted the server

The localhost still works but localhost_static doesn't

How to resolve the problem?

p.s. Of course, the D:/Server/localhost_static folder exists and has static index.html

0 Answers