您的位置:首页 > 运维架构 > Apache

php 在centos7 apache中的安装配置

2016-05-08 00:21 1101 查看
1.yum 安装 apache

yum install http

systemctl start httpd.service

yum install mysql-community-server

yum update

yum install php

systemctl list-unit-files

yum install php-mysql

修改配置

83 vi /etc/httpd/conf/httpd.conf

accphe配置,添加
AddType application/x-httpd-php .php


DirectoryIndex index.html index.php

然后重启 一下apache

systemctl restart httpd.service
http://ip/index.php
index.php 内容

<?php

phpinfo();

?>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: