在httpd.conf里加上下面的语句即可:
<Directory “/www/htdocs/xxx.com/html”>
    php_flag engine off
</Directory>

如果是要让某个虚拟主机不支持PHP,则如下设置:
<VirtualHost *>
    ServerName www.xxx.com
    DocumentRoot /www/htdocs/xxx.com
    ServerAdmin webmaster@xxx.com
    ErrorLog /www/logs/apache/xxx.com/error_log
    CustomLog /www/logs/apache/xxx.com/access_log common
    php_flag engine off
</VirtualHost>

来源:http://linux.computersci.net/forum/showflat.php?Cat=&Board=UBB17&Number=1581&page=9&view=expanded&sb=1&o=&vc=1

发表评论