1、编辑虚拟主机文件
vim /usr/local/apache2/conf/extra/httpd-vhosts.conf
2、添加以下模块
<Directory "/data/www/data">
php_admin_flag engine off
<filesmatch "(.*)php">
Order deny,allow
Deny from all
Allow from 127.0.0.1
</filesmatch>
</Directory>
3、打开浏览器访问显示禁止访问php
本文出自 “愺艮搥豩” 博客,请务必保留此出处http://riverxyz.blog.51cto.com/533303/1783004
原文地址:http://riverxyz.blog.51cto.com/533303/1783004