使用WAMP 3 (Apache/2.4.23 (Win64) PHP/7.0.10 mod_fcgid/2.3.9 Server at localhost Port 80)
# Virtual Hosts
#
<Directory c:/wamp/www/testdir>
Options +Indexes +FollowSymLinks +Multiviews
AllowOverride all
Require local
</Directory>
<VirtualHost *:80>
ServerAdmin <emailaddress>
DocumentRoot "c:/wamp/www/testdir/"
ServerName prerelease.mydomain.com
DirectoryIndex index.php
ErrorLog "logs/prerelease.mydomain.com-error.log"
CustomLog "logs/prerelease.mydomain.com-access.log" common
</VirtualHost>
#
这是我的httpd.conf(只在标准文件的末尾添加了这些行)
LoadModule fcgid_module modules/mod_fcgid.so
FcgidInitialEnv PHPRC "C:/wamp/bin/php/php7.0.10"
AddHandler fcgid-script .php
FcgidWrapper "C:/wamp/bin/php/php7.0.10/php-cgi.exe" .php
<IfModule fcgid_module>
FcgidIOTimeout 1200
FcgidConnectTimeout 1200
FcgidBusyScanInterval 1200
FcgidBusyTimeout 1200
FcgidErrorScanInterval 1200
FcgidIdleScanInterval 1200
FcgidIdleTimeout 1200
FcgidProcessLifeTime 3600
FcgidZombieScanInterval 1200
MaxRequestLen 15728640
FcgidMaxRequestLen 15728640
</IfModule>
我在这里读了20多个帖子,尝试了许多解决方案,但都无济于事。
以上所有工作在以前的WAMP版本(Apache 2.4.9, PHP 5.5.12,相同的mod_fcgid)。所以文件)。
可能的解决方案
改变<Directory c:/wamp/www/testdir>
Options +Indexes +FollowSymLinks +Multiviews
AllowOverride all
Require local
</Directory>
<Directory c:/wamp/www/testdir>
Options +Indexes +FollowSymLinks +Multiviews
AllowOverride all
Allow from all
</Directory>
它应该允许来自每个服务器的连接。
尝试安装32位版本。我知道你在技术上使用的是正确的版本,这只是我以前遇到过的一个问题。
将"ExecCGI"添加到选项中为我解决了这个问题:
<Directory / >
Options Indexes FollowSymLinks ExecCGI
# . . . . .
</Directory>