Apache 结合php

Apache主配置文件为:/usr/local/apache2/conf/httpd.conf
# vim /usr/local/apache2/conf/httpd.conf
找到:
AddType application/x-gzip .gz .tgz
在该行下面添加
AddType application/x-httpd-php .php

找到:
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>
将该行改为
<IfModule dir_module>
    DirectoryIndex index.html index.htm index.php
</IfModule>

找到:
#Include conf/extra/httpd-mpm.conf
#Include conf/extra/httpd-info.conf
#Include conf/extra/httpd-vhosts.conf
#Include conf/extra/httpd-default.conf
去掉前面的“#”号,取消注释。

添加新评论 »