美文网首页
ngnix 配置小记

ngnix 配置小记

作者: JakeBless | 来源:发表于2020-08-06 14:28 被阅读0次

同一个端口,不同路径配置, 非根路径时,要将root替换为alias

        location / {
            root   html;
            index  index.html index.htm;
        }

        location /easyform {
           alias /var/www/work/dist/;
           index index.html index.html;
        }

新增端口配置

   server {
        listen       81;
       server_name  localhost;

     location / {
           root    /var/www/work/dist;
           index  index.html index.htm;
      }
   }

代理配置

location / {
   proxy_pass http://127.0.0.1:3000;
}

相关文章

  • ngnix 配置小记

    同一个端口,不同路径配置, 非根路径时,要将root替换为alias 新增端口配置 代理配置

  • ngnix 本地起服务

    目的:本地调试ngnix配置,不影响服务器的运作. 需要下载ngnix,然后修改ngnix配置文件,准备好前端包 ...

  • nginx配置

    1、mac配置ngnix ngnix基本配置说明 需要注意的有以下几点:(1).http_x_forwarded_...

  • ngnix配置

  • ngnix配置

    致敬原文作者,原文地址:https://www.nginx.cn/115.html[https://www.ngi...

  • ngnix使用记录

    ngnix使用记录 ngnix配置文件在/etc/nginx/conf.d nginx -t 检查语法是否有错误 ...

  • zeppelin踩坑

    ngnix配置问题 报错: Error during WebSocket handshake: Unexpecte...

  • Ngnix访问静态文件

    ngnix版本: 1.10.3 系统版本 ubuntu 16.04配置ngnix的静态文件有两种方法 默认文件夹N...

  • Ngnix 配置websocket

  • ngnix 配置详解

网友评论

      本文标题:ngnix 配置小记

      本文链接:https://www.haomeiwen.com/subject/ztwzrktx.html