Search code examples
linuxapachedocument-root

multiple document root for httpd conf file


In the following http-conf file how to add on more entry to add bugzilla

i.e, 123.21.1.21 goes to my website and 123.21.1.21/bugzilla is pointed to /opt/bugzilla

     <VirtualHost *:80>
     DocumentRoot /var/www/html/web
     ServerName Domainspace
     </VirtualHost>
     <Location "/">
     </Location>

Solution

  • I just set bugzilla up the other day, similar scenario. Here is my httpd.conf

    NameVirtualHost xxx.xxx.xxx.local
    
    <VirtualHost  xxx.xxx.xxx.local>
      ServerName  xxx.xxx.xxx.local
      DocumentRoot "C:/Apache2.2/htdocs"
    </VirtualHost>
    
    <VirtualHost  xxx.xxx.xxx.local>
      ServerName  xxx.xxx.xxx.local
      DocumentRoot "C:/bugzilla"
    </VirtualHost>
    

    followed by

    Alias /bugzilla "C:\bugzilla"
    <Directory "C:\bugzilla">
    AddHandler cgi-script .cgi
    Options +Indexes +ExecCGI
    DirectoryIndex index.cgi
    AllowOverride Limit FileInfo Indexes
    Order allow,deny
    Allow from all
    </Directory>