在Caddy而不是NGINX下切换Atlassian汇流

在Caddy而不是NGINX下切换Atlassian汇流,nginx,confluence,caddy,caddyfile,Nginx,Confluence,Caddy,Caddyfile,因此,我最近开始遇到NGINX崩溃的问题,原因不明 在花了很多时间试图修好它之后,我决定换成球童 我的caddy配置用于浏览网站,但它破坏了编辑页面时使用的/synchrony访问。我使用纯websocket部分进行了测试,但Confluence也通过该路径检索一些脚本 我将以下内容用作部队射击的参考: 我的工作NGINX配置 server { listen 443 ssl; server_name [REDACTED]; ssl_certificate [REDAC

因此,我最近开始遇到NGINX崩溃的问题,原因不明

在花了很多时间试图修好它之后,我决定换成球童

我的caddy配置用于浏览网站,但它破坏了编辑页面时使用的
/synchrony
访问。我使用纯websocket部分进行了测试,但Confluence也通过该路径检索一些脚本

我将以下内容用作部队射击的参考:

我的工作NGINX配置

server {
    listen 443 ssl;

    server_name [REDACTED];

    ssl_certificate [REDACTED];
    ssl_certificate_key [REDACTED];

    client_max_body_size 100m;

    location / {
        proxy_pass http://localhost:8090;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
    }
    location /synchrony {
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://localhost:8091/synchrony;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
    }
}
https://[REDACTED] {
  log access.log
  errors error.log
  gzip
  tls "C:\caddy\[REDACTED].cer" "C:\caddy\[REDACTED].key"

  proxy /synchrony http://localhost:8091/synchrony {
    websocket
  }

  proxy / http://localhost:8090 {
    except /synchrony
    transparent
  }
}
我建议的等效非工作助手配置

server {
    listen 443 ssl;

    server_name [REDACTED];

    ssl_certificate [REDACTED];
    ssl_certificate_key [REDACTED];

    client_max_body_size 100m;

    location / {
        proxy_pass http://localhost:8090;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
    }
    location /synchrony {
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://localhost:8091/synchrony;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
    }
}
https://[REDACTED] {
  log access.log
  errors error.log
  gzip
  tls "C:\caddy\[REDACTED].cer" "C:\caddy\[REDACTED].key"

  proxy /synchrony http://localhost:8091/synchrony {
    websocket
  }

  proxy / http://localhost:8090 {
    except /synchrony
    transparent
  }
}
以上内容基于以下文件: 它使用
透明
websocket
预设

似乎阻止编辑页面的主要错误
我认为您可能需要在不使用参数的情况下使用

without
是一个URL前缀,在将请求代理到上游之前进行修剪。例如,不带/api
的对
/api/foo
的请求将导致对
/foo
的代理请求

你可以试试这个:

https://[REDACTED] {
  log access.log
  errors error.log
  gzip
  tls "C:\caddy\[REDACTED].cer" "C:\caddy\[REDACTED].key"

  proxy /synchrony http://localhost:8091/synchrony {
    websocket
    without /synchrony
  }

  proxy / http://localhost:8090 {
    except /synchrony
    transparent      
  }
}