码迷,mamicode.com
首页 > Web开发 > 详细

0545-配置apache实现与php的整合

时间:2017-08-29 09:25:58      阅读:159      评论:0      收藏:0      [点我收藏+]

标签:linux

整合

###########接下来配置apache httpd.conf来支持php####
[root@web02 php-5.3.27]# cd /application/apache/conf/
[root@web02 conf]# vi httpd.conf
在大概318 319行的下面新增320行、321号的内容如下所示
    318     AddType application/x-compress .Z
    319     AddType application/x-gzip .gz .tgz
    320 AddType application/x-httpd-php .php .phtml
    321 AddType application/x-httpd-php-source .phps
通过搜索/DirectoryIndex,在168行的DirectoryIndex index.html修改为DirectoryIndex index.php index.html
在67行下增加:
User www
Group www
建立用户:
然后检查语法
[root@web02 conf]# ../bin/apachectl -t
Syntax OK
[root@web02 conf]# ../bin/apachectl graceful
httpd not running, trying to start
[root@web02 conf]# ../bin/apachectl start
httpd (pid 1838) already running
[root@web02 conf]# ../bin/apachectl graceful


本文出自 “sandshell” 博客,请务必保留此出处http://sandshell.blog.51cto.com/9055959/1960324

0545-配置apache实现与php的整合

标签:linux

原文地址:http://sandshell.blog.51cto.com/9055959/1960324

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!