Can Apache be configured to specify more than one docroot per virtualhost?

Posted by syn4k on Server Fault See other posts from Server Fault or by syn4k
Published on 2012-06-08T22:02:22Z Indexed on 2012/06/08 22:41 UTC
Read the original article Hit count: 168

I have a vhost which specifies

<VirtualHost *:80>
  DocumentRoot "/private/var/www/html/cms/sites/"
  ServerName localhost.com
</VirtualHost>

I would like to know if localhost.com can also point to /private/var/www/html/wordpress/. This seems like a no brainer but Apache is like black magic; these things are always possible.

Anyway, I already know that I could specify a new ServerName entry and set a new docroot. The problem is, both directories need to be available as roots.

If I need to provide more info, I will gladly do so.

© Server Fault or respective owner

Related posts about apache2

Related posts about virtualhost