在调试h5页面的时候想在手机端看效果对不对,对于公司这个电脑配置~不想多开一个webstorm或者hbuilder来访问地址。IIS又搭不好~~~~~

1.下载nginx

2.nginx常用指令

start nginx 启动nginx
nginx -s reload 重启nginx
nginx -s stop 关闭nginx

3.配置访问路径(conf/nginx.conf):

        listen       8088;  //监听端口
        server_name  localhost;  //域名或IP

        location / {
            root   "E:\haililaw\haililaw_marry";  //文件路径--里面要有一个index.html
            index  index.html index.htm;
            
        }

4.遇到的错误:

windows下nginx简单使用说明

解决:注意端口的使用,80或8080这两个常用的端口可能会有些冲突。换一个奇奇怪怪的端口试一下

windows下nginx简单使用说明

解决:location路径里不要有中文

相关文章:

  • 2022-01-07
  • 2021-05-23
  • 2021-09-08
  • 2022-02-05
  • 2022-12-23
  • 2022-12-23
  • 2021-04-05
  • 2021-10-03
猜你喜欢
  • 2021-12-12
  • 2021-06-03
  • 2021-12-06
  • 2022-01-08
  • 2021-12-21
  • 2021-05-24
  • 2021-06-20
相关资源
相似解决方案