JFrog Artifactory OSS 在“设置我”中显示端口

时间:2021-02-09 06:01:24

标签: maven artifactory jfrog

我最近设置了 JFrog Artifactory OSS,我让它在带有 Lets Encrypt SSL 证书的 nginx 反向代理后面运行。

我可以正常访问该站点(无需输入端口等)。然而;当我单击存储库上的“设置我”按钮时;它在 <url> 字段中有端口。它是这样显示的; https://sub.domain.net:443/artifactory/maven-releases/

我已将 Artifactorys 基本 URL 设置为 https://sub.domain.net/

我已经包含了我的 nginx 配置。

server {
      
    server_name www.sub.domain.net sub.domain.net;
 
    if ($http_x_forwarded_proto = '') {
        set $http_x_forwarded_proto  $scheme;
    }
    rewrite ^/$ /ui/ redirect;
    rewrite ^/ui$ /ui/ redirect;
    chunked_transfer_encoding on;
    client_max_body_size 0;
    location / {
        proxy_read_timeout  2400s;
        proxy_pass_header   Server;
        proxy_cookie_path   ~*^/.* /;
        proxy_pass          http://xxx.xx.xxx.xx:8082;
        proxy_next_upstream error timeout non_idempotent;
        proxy_next_upstream_tries    1;
        proxy_set_header    X-JFrog-Override-Base-Url $http_x_forwarded_proto://$host:$server_port;
        proxy_set_header    X-Forwarded-Port  $server_port;
        proxy_set_header    X-Forwarded-Proto $http_x_forwarded_proto;
        proxy_set_header    Host              $http_host;
        proxy_set_header    X-Forwarded-For   $proxy_add_x_forwarded_for;
 
        location ~ ^/artifactory/ {
            proxy_pass    http://xxx.xx.xxx.xx:8081;
        }
    }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/sub.domain.net/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/sub.domain.net/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;


}
server {
    if ($host = www.sub.domain.net) {
        return 301 https://$host$request_uri;
    }


    if ($host = sub.domain.net) {
        return 301 https://$host$request_uri;
    }


    listen 80 ;
      
    server_name www.sub.domain.net sub.domain.net;
    return 404;

}

您能提供的任何帮助将不胜感激。谢谢。

0 个答案:

没有答案