>  기사  >  php教程  >  阿里云服务器安装配置Apache+php服务器

阿里云服务器安装配置Apache+php服务器

WBOY
WBOY원래의
2016-06-06 20:02:001141검색

一、ssh登陆阿里云服务器 执行命令: yum install php 二、启动Apachephp服务器 命令: httpd -k start 异常: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName 处理: find -name httpd.co

一、ssh登陆阿里云服务器

执行命令:

yum install  php

二、启动Apache+php服务器

命令:

httpd -k start

异常:

httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

处理:

find -name httpd.conf

编辑httpd.conf文件,搜索"#ServerName",添加ServerName localhost:80

如:

[root@server conf]# vi httpd.conf
#ServerName www.example.com:80
ServerName localhost:80
再重新启动apache 即可。

三、通过ftp上传HTML或php项目文件到/var/www/html

如:上传文件为test.html或test.php

四、访问阿里云apahe+php服务器

如:在浏览器中输入:阿里云公网ip/test.html/php 访问阿里云服务器

至此配置结束。


성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
이전 기사:protect/config/mian.php다음 기사:【汇总】PHP