5imobi 发表于 2018-11-17 12:51:49

LAMP环境搭建之apache与php结合

vim /usr/local/apache2.4/conf/httpd.conf //修改以下4个地方  ServerName
  Require 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]
查看完整版本: LAMP环境搭建之apache与php结合