Apache配置
zbox\etc\apache\httpd.conf 文件添加如下内容
<VirtualHost *:%APACHE_PORT%>
ServerAdmin zentao@local.net
DocumentRoot "%APP_PATH%zentao/www"
ServerName localhost:%APACHE_PORT%
<Directory />
AllowOverride all
Require all granted
<Files "index.php">
SetHandler application/x-httpd-php
</Files>
<Files "upgrade.php">
SetHandler application/x-httpd-php
</Files>
<Files "install.php">
SetHandler application/x-httpd-php
</Files>
<Files "checktable.php">
SetHandler application/x-httpd-php
</Files>
</Directory>
<DirectoryMatch "%APP_PATH%zentao/www/.+/.*">
<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
SetHandler text/plain
</FilesMatch>
</DirectoryMatch>
ErrorLog "%LOG_PATH%apache/error_log"
CustomLog "%LOG_PATH%apache/access_log" combind
</VirtualHost>
重写规则配置
zbox\etc\ztaccess\default.ztaccess 文件
修改前
RewriteRule (.*)$ /zentao/index.php/$1 [L]
修改后:
RewriteRule (.*)$ /index.php/$1 [L]
Apache重新安装
ZenTao.exe控制面板,Apache下拉中找到并点击“重新安装”,访问测试。
以上两个修改文件分别重新生成文件zbox\bin\apache\conf\httpd.conf、### zbox\app\zentao\www.ztaccess