服务器的http访问

发布文章 博文管理我的博客退出 Trash Temp 服务器的http访问 服务器的搭建
1:关闭防火墙
在这里插入图片描述
2关闭selinux
在这里插入图片描述
3,挂载
在这里插入图片描述
4.安装http
在这里插入图片描述
5配置本地文件
在这里插入图片描述
6,重启httpd服
在这里插入图片描述
7重启服务
在这里插入图片描述
8查看日志
在这里插入图片描述
根目录下创建静态资源
[root@localhost ~]# vim /etc/httpd/conf/httpd.conf
登录http产看结果

搭建web服务器能访问内容
[root@localhost ~]# vim /etc/httpd/conf.d/vhosts.conf <Directory /hsh>
AllowOverride none
Require all granted

Listen 10000
<virtualHost 192.168.203.129:10000>
Serveradmin root@localhost.localdomain
DocumentRoot /hsh
Servername 192.168.203.129
Errorlog /var/log/httpd/dummy-host2.example.com-error_log
Customlog /var/log/httpd/dummy-host2.exampl.com-access_log common

[root@localhost ~]# vim /etc/httpd/conf.d/vhosts.conf
[root@localhost ~]# mkdir /wnagjieran
[root@localhost ~]# echo 小胖,你咋这么胖呢! >/hsh/index.html
[root@localhost ~]# systemctl restart httpd
Failed to restart httpd.service: Unit not found.
[root@localhost ~]# curl http://192.168.203.129:10000
小胖,你咋这么胖呢!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值