Nexus3 坚持初始化并且没有正确解析内容类型

Nexus3 stuck on initializing and not properly resolving content-type

我 运行 Nexus3 在服务器上的 docker 容器中,该容器也使用 nginx reverse-proxy。问题是,当尝试从浏览器访问 Nexus 存储库时,我得到一个包含许多控制台错误的损坏页面。这是我看到的:

查看网络选项卡后,我注意到我的服务器没有为我的请求设置正确的 content-type。这是对 js 文件的请求示例:

有人知道这是什么吗?这就是我的 nginx.conf 的样子:

server {
        listen 443 ssl http2;
        ssl_certificate /etc/ssl/confidential.com/fullchain.cer;
        ssl_certificate_key /etc/ssl/confidential.com/*.confidential.com.key;
        server_name confidential.com;

    location /test {
      proxy_pass http://nexus:8081/;
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto "https";
    }



    }

你有:

location /test {
      proxy_pass http://nexus:8081/;

Nexus 的上下文路径需要与通过反向代理服务的上下文路径相匹配。编辑 $workdir/etc/nexus.properties 并设置 "nexus-context-path=/test"。并将 proxy_pass 更改为 "proxy_pass http://nexus:8081/test".