yum httpd 不解析php怎么办

yum httpd不解析php的解决办法:1、打开“httpd.conf”文件,添加“index.php”索引;2、增加文件解析类型,修改内容如“AddType application/x-httpd-php .php”;3、设置php-fpm连接参数,并增加fastcgi支持模块;4、重载httpd服务即可。

本教程操作环境:linux5.9.8系统、PHP8.1版、DELL G3电脑

yum httpd 不解析php怎么办?

yum安装php apache(httpd)无法正常解析php界面

背景

yum安装php7.2 httpd后,apache无法正常解析index.php

解决办法

一般修改httpd.conf即可,括号路径为我实际修改文件

添加index.php索引(/etc/httpd/conf/httpd.conf)

<IfModule dir_module>
    DirectoryIndex index.php index.htm index.html #增加index.php
</IfModule>

登录后复制

hmoban主题是根据ripro二开的主题,极致后台体验,无插件,集成会员系统
自学咖网 » yum httpd 不解析php怎么办
温馨提示您:本站所载文章、数据仅供参考,如果有文章侵犯了您的权益,请来信告知我们删除,联系邮箱:976157886@qq.com
Copyright © 2023 自学咖网 - All rights reserved 浙ICP备2023005527号