首页 > 系统相关 >nginx配置

nginx配置

时间:2023-01-12 08:22:58浏览次数:30  
标签:upgrade http header 配置 nginx set proxy datart

map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

server {
listen 8888;
server_name localhost;

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

   #datart
  location /datart {
      alias D:\a_workProject\参考demo\datart\frontend\build;
  }

  #socket
  location /sockjs-node {
      rewrite  ^/(.*)  /$1 break;
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection $connection_upgrade;
      proxy_set_header Host $http_host;
      proxy_pass http://localhost:3000/;
  }

}

标签:upgrade,http,header,配置,nginx,set,proxy,datart
From: https://www.cnblogs.com/DaiTouE/p/17045371.html

相关文章