一.搭建静态网站

1.基于ip实现web网站访问 建立一个xxx.xxx.xxx.100的网站,文件放在/www/100,内容显示this is xxx.xxx.xxx.100. 建立一个xxx.xxx.xxx.200的网站,文件放在/www/200,内容显示this is xxx.xxx.xxx.200. 

1>配置网络

web服务基本配置

web服务基本配置

2>编辑配置文件

web服务基本配置

3>编辑子配置文件

web服务基本配置

web服务基本配置

4>关闭防火墙并重启网络服务

web服务基本配置web服务基本配置

5>测试

web服务基本配置

web服务基本配置

2.基于端口实现web网站访问建立 建立xxx.xxx.xxx.100网站基于不同端口(8909,10000)访问不同网站内容!(内容自定义)

1>配置文件

web服务基本配置 

web服务基本配置

2>重启服务并检查服务运行状态

web服务基本配置

3>测试

web服务基本配置

web服务基本配置

3.基于域名搭建不同web网站 建立www.openlab.com的网站信息,内容自定义

1>编辑网页内容

web服务基本配置

2>编辑配置文件 vim  /etc/httpd/conf.d/vhost.conf

web服务基本配置

3>重启服务并检查服务运行动态

web服务基本配置

4>将域名及对应ip写入hosts文件

web服务基本配置

web服务基本配置

5>测试

web服务基本配置

web服务基本配置

相关文章:

  • 2021-07-30
  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
  • 2021-11-11
  • 2022-01-12
  • 2021-10-26
猜你喜欢
  • 2021-06-27
  • 2021-08-08
  • 2021-06-05
  • 2021-04-23
  • 2022-02-11
  • 2021-05-14
  • 2021-08-06
相关资源
相似解决方案