apache 不解析php

对apache的参数,还是不够理解。

1.找到:

AddType application/x-gzip .gz .tgz
在其下面添加:

AddType application/x-httpd-php .php //添加支持对php脚本解析

2. 找到:

DirectoryIndex index.html

把中间那一行改为:

DirectoryIndex index.html index.htm index.php //增加对php的索引

 

正常了。

另外,PHP编译的时候,要调用apache这个模块, --with-apxs2=/usr/local/apache2/bin/apxs

你可能感兴趣的:(Apache)