多个文档根目录的httpd的conf文件
-
27-09-2019 - |
题
在以下http-conf的文件如何在多个条目添加到添加的bugzilla
即,123.21.1.21去我的网站和123.21.1.21/bugzilla指向到/ opt / Bugzilla的
<VirtualHost *:80>
DocumentRoot /var/www/html/web
ServerName Domainspace
</VirtualHost>
<Location "/">
</Location>
解决方案
我刚刚成立的Bugzilla了一天,类似的情景。这是我的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>
接着
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>
其他提示
使用Alias
。
<VirtualHost *:80>
DocumentRoot /var/www/html/web
ServerName Domainspace
Alias /bugzilla /opt/bugzilla
</VirtualHost>
我知道这是回答,但这个工作对我来说MacOSX上
Alias /otherwork "/Volumes/anothervolume/otherwork"
<Directory "/Volumes/anothervolume/otherwork">
Options Indexes FollowSymLinks ExecCGI Includes
AllowOverride All
Require all granted
#more options here
</Directory>
不隶属于 StackOverflow