Nginx.d 设置

#vi nginx.conf  

最后一行添加

#加载conf.d内文件

include /usr/local/nginx/conf/conf.d/*.conf;

 

示例 cd  conf.d

     Vi  ****-listen8080.conf

  server{

        listen 80;

        server_name localhost;

     location / {

      include agent_deny.conf;

      root /usr/local/nginx/yun/dist/;

      index /index.html;

      try_files $uri $uri/ /index.html;

}

     location /api {

             include agent_deny.conf;

             proxy_pass http://192.168.2.86:8762/;

      }

}

posted @ 2021-02-02 16:28  韩憨  阅读(277)  评论(0编辑  收藏  举报
//看板娘