Linux中使用Apache发布html网页

  • 在线学习:
  • https://www.shiyanlou.com/courses/1
  • 工具/原料

  • Linux,httpd,vi
  • 样例html文件一份

方法/步骤

 
  1. 1

    编辑httpd配置文件

    Linux中使用Apache发布html网页(下)
  2. 2

    查找DirectoryIndex配置段

    Linux中使用Apache发布html网页(下)
  3.  

    在这后面添加index2.html也就是刚才的网页名称

    Linux中使用Apache发布html网页(下)
  4.  

    在这把监听端口改为了8080

    Linux中使用Apache发布html网页(下)
  5.  

    保存并退出

    Linux中使用Apache发布html网页(下)
  6.  

    重启httpd服务

    Linux中使用Apache发布html网页(下)
  7.  

    浏览测试,说明配置成功

    Linux中使用Apache发布html网页(下)
  8.  

    这里可以修改字体是否支持中文

    Linux中使用Apache发布html网页(下)
  9.  

    这里是网页的存放路径

    Linux中使用Apache发布html网页(下)
  10.  

    这里是网页的存放目录要与16步骤中的最好一致

    Linux中使用Apache发布html网页(下)
  11.  

    如果字体中的中文显示乱码,可以修改这里,请参考该图片

    Linux中使用Apache发布html网页(下)
  12.  赞

posted @ 2017-07-28 00:51  zfzhp  阅读(4681)  评论(0编辑  收藏  举报