ngxin部署配置

解决方案 技术

Nginx

2020-07-01 15:28:41

342

作者:黑夜男神

server
{
  listen 80;
  server_name www.csde.club 106.55.157.83;
  # 前台blog
  location / {
    proxy_pass http://127.0.0.1:8012 ;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $remote_addr;
  }
  # 后台二级前端路由目录
  location /csde_admin {
    alias html/csde-admin-vue/dist;
    expires 7d; # 缓存浏览器7天
    index index.html;
  }
  # 后端接口地址
  location ~api/ {
    proxy_pass http://localhost:10086;
    proxy_redirect off;
    proxy_set_header Remoteip $http_remoteip;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_set_header X-NginX-Proxy true;
  }
  # 静态文件目录
  location ~public/ {
        proxy_pass http://localhost:10086;
    }
    # webhook钩子
  location /webhook {
     proxy_pass http://localhost:7777/webhook;
  }   
}

评论 (2)

用户名
邮箱
评论
  • r4eg 2021-04-04 09:19:38

    买单号,上单号网www.danhw.com

    • fevcv 2021-04-04 09:19:22

      https://www.tanj.com.cn/link

      Copyright © 2020 darkNightMan All Rights Reserved Pro 黔ICP备20005477号