【Centos】http服务环境搭建

安装操作系统

centos

安装配置步骤

1)yum安装

yum install httpd

2)配置端口信息:/etc/httpd/conf/httd.conf

Listen 81

3)配置静态网页存放地址:/etc/httpd/conf/httd.conf

DocumentRoot /var/www/html

启动http服务

service httpd start

常见注意事项

1、如果遇到网页无法正常访问,可检查防火墙是否开放所需访问端口

2、域名解析配置

win10

C:\Windows\System32\drivers\etc\hosts

附录A

1、相关配置

服务目录:/etc/httpd

/etc/httpd/conf/httpd.conf

猜你喜欢

转载自blog.csdn.net/leftAright/article/details/79877293
今日推荐