标签: nexus

Nexus的Nginx SSL终止代理不能使用不同于443的端口

我有一个Nginx作为Nexus存储库的SSL终止反向代理.

这是配置:

server {
    server_name nexus.example.com;
    listen 443 ssl;

    ssl_certificate /etc/letsencrypt/live/nexus.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/nexus.example.com/privkey.pem;

    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;

    client_max_body_size 1G;

    location / {
        if ($http_user_agent ~* docker) {
            proxy_pass http://127.0.0.1:8082;
        }

        proxy_pass http://127.0.0.1:8081;
        proxy_cookie_path / "/; secure; HttpOnly";

        proxy_set_header   Host $http_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-Host $server_name;
        proxy_set_header   X-Forwarded-Proto $scheme;

    }

    access_log  /var/log/nginx/nexus_access.log;
    error_log /var/log/nginx/nexus_error.log;
}
Run Code Online (Sandbox Code Playgroud)

这没关系,工作正常.但是,我想在另一个端口公开Nginx,比方说10000.如果我更改配置并重新启动Nginx和Nexus,每当我访问时都会nexus.example.com:10000遇到多个错误,因为浏览器正在对资源进行请求https://nexus.example.com(没有端口) .

我认为这可能是一个缓存问题,所以我尝试了隐身模式,但它也没有用.试过一个全新的虚拟机,同样的问题,所以我放弃了缓存问题.

如果我直接在nexus.example.com:8081上公开Nexus,它也能正常工作.

可能有什么问题?

我尝试了以下解决方法,但是虽然我能够访问Nexus首页,但我无法登录.

server {
    listen 443 ssl;
    ssl_certificate /etc/letsencrypt/live/nexus.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/nexus.example.com/privkey.pem;
    location / …
Run Code Online (Sandbox Code Playgroud)

reverse-proxy nginx nexus

0
推荐指数
1
解决办法
1085
查看次数

Nexus 服务立即停止 2

字面上地。看来已经有很多人有类似的问题了。 也许一个问题类似于我的问题。 但是我还没有找到解决方案,所以我写得很详细。

我按照教程中的描述在Centos7服务器上安装了 nexus 。教程错误地记录了服务文件中的和命令。反正我修好了。但是,运行 Nexus 将立即终止。execStartexecStop

上一个问题有一些答案。

  • nexus执行账号必须有路径权限。(已解决)
  • Root账号不应该运行nexus。(已解决)

然而,立即终止没有解决。

我认为唯一的提示如下。 官方文档包含有关 pid 文件的信息。

如果无法写入服务 pid 文件,则服务启动将静默失败,不会将任何日志语句写入 nexus.log。

我找不到nexus.log文件。这意味着无法根据上述信息创建pid文件。但它只是jvm.log存在而已。连接到nexus帐户(创建用于运行 Nexus)并在文件/tmp夹中手动创建文件后,可以在没有任何权限问题的情况下进行创建和删除。但是,如果我在该帐户中手动打开 Nexus,它也会立即关闭。

你怎么能修好呢?我在等待帮助。

linux nexus sonatype centos7 nexus3

0
推荐指数
1
解决办法
763
查看次数

Istio 虚拟服务 - 外部 HTTPS 服务的代理

我正在尝试将具有指定 URI 前缀的 HTTP 请求代理到外部 HTTPS 服务器。这个想法是使用 NPM 的内部 Nexus 存储库管理器,但不要像GitHub 项目那样放弃“npm 审计”的能力。应该使用 Istio 来完成,而不是部署额外的应用程序。

我配置了一个虚拟服务和一个服务条目以将流量路由到外部服务。到目前为止,还无法将 HTTP 请求转换为 HTTPS 请求。有机会这样做吗?

配置:

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: vs-nexus
spec:
  hosts:
  - "test.com"
  gateways:
  - gateway-xy
  http:
  - match:
    - uri:
        prefix: /-/npm/v1/security/audits/
    route:
      - destination:
          port:
            number: 443
          host: registry.npmjs.org
  - route:
    - destination:
        port:
          number: 80
        host: nexus


---
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
  name: npmjs-ext
spec:
  hosts:
    - registry.npmjs.org
  ports:
    - number: 443
      name: tls
      protocol: …
Run Code Online (Sandbox Code Playgroud)

nexus istio npm-audit istio-gateway

0
推荐指数
1
解决办法
2028
查看次数

无法在redhat linux服务器6.5上启动Nexus oss

我已经在linux服务器6.5上安装了nexus 2.8.1-01,但是当我尝试启动时它得到了以下结果.有人会帮助我吗?

[uszbwp6 @ ANV-WFM-DLAPP01 nexus-2.8.1-01] $ ./bin/nexus start`

启动Nexus OSS ...无法启动Nexus OSS.

谢谢,鲍勃

nexus

-1
推荐指数
1
解决办法
7642
查看次数

在Kubernetes集群中使用Docker运行Nexus 3

sonatype\nexus3在Kubernetes中运行并允许使用Docker存储库的最佳设置是什么?

目前,我有一个基本设置:

  • 部署 sonatype\nexus3
  • 内部服务暴露端口80和5000
  • Ingress + kube-lego提供对Nexus UI的HTTPS访问

如何解决不允许使用多个端口的入口限制?

nexus kubernetes

-1
推荐指数
3
解决办法
6619
查看次数