Search code examples
apachevirtualhosthttpd.confvirtual-hosts

Virtualhosts pointing to the first virtualhost directory


I have a problem in my httpd.conf.

All my VirtualHosts I created from the WebMin interface are pointing to the same directory despite I give a specific directory for each VH. The directory which actually pointing is from the first VH(when I change the position of the VH, it's always the first VH directory).

Thanks for your Help.


Solution

  • I don't know how Webmin handles virtual hosts, but Apache needs a NameVirtualHost directive

    NameVirtualHost *:80
    

    You can add it to your httpd.conf as well. Sometimes it is in ports.conf or in the default virtual host (000-default)