Skip to content

eastseven/websocket-tail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

在线日志


参考

部署

mvn clean package

java -jar  -Dcmd.tail.path=日志文件绝对路径 target/websocket-tail-1.0.0.jar

浏览器访问 http://localhost:8765/ 即可

nginx 配置

upstream ws_server {
  server 127.0.0.1:3000;
}

server {
  listen 80;
  server_name ws.repo;

  location / {
    proxy_pass http://ws_server/;
    proxy_redirect off;

    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
  }
}

核心配置就下面这三行

    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";

About

在线日志小工具,方便运维

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published