标题
centos下httpd(apache)引入php
php重装不知怎么搞得发现原有的php文件没有解析了,经过nginx直接展示成了php的源码
- 重装了
httpd
# yum remove httpd # rm -rf /etc/httpd/ # yum install httpd # vim /etc/httpd/conf/httpd.conf # httpd
修改了
ServerName localhost:80
与Listen 80
- 因重新编译
php
未找到正确的方法,一直未生成libphp5.so
换了种方式# yum provides */libphp5.so Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile `* base: mirrors.aliyun.com `* epel: mirrors.tongji.edu.cn `* extras: mirrors.aliyun.com `* remi-safe: mirrors.tuna.tsinghua.edu.cn `* updates: mirrors.aliyun.com `* webtatic: us-east.repo.webtatic.com epel/x86_64/filelists | 10 MB 00:00:00 extras/7/x86_64/filelists_db | 588 kB 00:00:00 jenkins/filelists_db | 15 kB 00:00:00 mongodb/filelists | 10 kB 00:00:00 remi-safe/filelists_db | 1.0 MB 00:00:00 updates/7/x86_64/filelists_db | 2.7 MB 00:00:00 php-5.4.16-45.el7.x86_64 : PHP scripting language for creating dynamic web sites Repo : base Matched from: Filename : /usr/lib64/httpd/modules/libphp5.so
- 最后在
/etc/httpd/conf/httpd.conf
的Include conf.modules.d/*.conf
后加入了LoadModule php5_module /usr/lib64/httpd/modules/libphp5.so
重启后解决