httpd confファイルの複数のドキュメントルート
-
27-09-2019 - |
質問
次のhttp-confファイルで、bugzillaを追加するためにさらにエントリを追加する方法
IE、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