LAMP环境搭建之apache与php结合
vim /usr/local/apache2.4/conf/httpd.conf //修改以下4个地方 ServerNameRequire all denied
AddType application/x-httpd-php .php
DirectoryIndex index.html index.php
具体操作:
1,打开这一行ServerName www.example.com:80
2,Require all denied改为Require all granted
3,AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
在上面两行下面加上这一行,不增加这一行php没办法解析
AddType application/x-httpd-php .php
4,DirectoryIndex index.html改为DirectoryIndex index.html index.php 增加一个索引页
页:
[1]