Hexo端口被占用问题解决

问题

更换了新的电脑,通过Dropbox重新更新下来blog文件夹

hexo s 命令启动本地服务器,但是localhost:4000无法访问

image-20220304133106506

http://localhost:4000 无法访问

解决方案

  1. 更换端口重新尝试

    1
    hexo s -p 4001
  2. 在_config.yml文件中加入配置

    1
    2
    3
    4
    server:
    port: 5000
    compress: true
    header: true
  3. 如果修改端口无法解决,则:

​ 打开控制面板 — 程序和功能 — 打开或关闭Windows功能 —- 勾选上Internet Informent Services —–点击确定即可

image-20220304141941178