开发者

multiple document root for httpd conf file

开发者 https://www.devze.com 2023-01-26 12:28 出处:网络
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 开发者_如何学Go/opt/bugzilla

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 开发者_如何学Go/opt/bugzilla

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


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>


Use Alias.

<VirtualHost *:80>
 DocumentRoot /var/www/html/web
 ServerName Domainspace
 Alias /bugzilla /opt/bugzilla
 </VirtualHost>


I know this is answered but this worked for me on macosx

Alias /otherwork "/Volumes/anothervolume/otherwork"
<Directory "/Volumes/anothervolume/otherwork">
    Options Indexes FollowSymLinks ExecCGI Includes
    AllowOverride All
    Require all granted
    #more options here
</Directory>
0

精彩评论

暂无评论...
验证码 换一张
取 消