发布文章 博文管理我的博客退出 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
小胖,你咋这么胖呢!