wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b搭建php环境
在win下,下载wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe,默认安装。
然后打开安装目录下apache的httpd.conf配置文件D:\wamp\bin\apache\apache2.4.9\conf\httpd.conf
修改如下:
Listen 0.0.0.0:8088
Listen [::0]:8088 ServerName localhost:8088 DocumentRoot "D:/kkkoffice/wwwroot" <Directory />
#AllowOverride none
#Require all denied
Options FollowSymLinks
AllowOverride None
Order deny,allow
#Deny from all
allow from all
</Directory> <Directory "D:/wamp/www/">
Options FollowSymLinks
AllowOverride None
Order deny,allow
allow from all
</Directory>
说明:
Listen 监听端口
ServerName 服务器名字(带有端口号)
DocumentRoot php文件路径(注意:最后面一定不要带"/")
可能出现的问题:访问 http://localhost:8088/phpinfo.php
如果出现You don't have permission to access /test/file.php on this server
注释Deny from all ----拒绝所有想访问
添加allow from all
每次修改完apache的httpd.conf都记得要重启apache
重启刷新页面正常访问如下
好啦,环境已经搭建成功!