在我们的老服务器(托pipe)上,Artifactory运行在Apache代理之后。 公开的url是http://repo.example.com/
我们的托pipe服务提供商把我们搬到了新的服
我们要求我们的托pipe服务提供商将url更改回http://repo.example.com/ ,因为现在我们的Jenkins工作正在中断,而外部用户可能依赖于该url。 他们告诉我,我首先需要改变Artifactory中的一些设置(没有详细说明),但是我可以在Web界面中find的唯一设置是自定义url库,并且已经设置为http:// repo。 example.com 。 我最好的猜测是在运行Artifactory的Tomcat服务器的configuration中需要改变某些东西
我真正需要的是一个configuration,我可以发送到我们的托pipe服务提供商,所以他们可以从我的电子邮件复制粘贴。
短版本: 如何在http://repo.example.com上访问运行在Nginx后面的Artifactory?
编辑:这是当前的/usr/local/artifactory/tomcat/conf/server.xml :
<Server port="8015" shutdown="SHUTDOWN"> <Service name="Catalina"> <Connector port="8083"/> <Engine name="Catalina" defaultHost="localhost"> <Host name="localhost" appBase="webapps"/> </Engine> </Service> </Server>
将它改为:
<Server port="8015" shutdown="SHUTDOWN"> <Service name="Catalina"> <Connector port="8083"/> <Engine name="Catalina" defaultHost="localhost"> <Host name="localhost" appBase="webapps"> <Context path="" docBase="."/> </Host> </Engine> </Service> </Server>
如上所述,我没有对服务器的root权限,所以我不能自己修改。
这是他们可能放在/etc/nginx/sites-enabled/java_artifactory以使其工作:
server { listen 80; server_name artifactory.java.********** ; error_log /var/log/nginx/java/artifactory_error.log; access_log /var/log/nginx/java/artifactory_access.log; location / { # rewrite ^/?$ http://**********/webapp/home.html; # rewrite ^/artifactory(.*)$ http://**********$1; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; proxy_read_timeout 300s; # proxy_pass http://localhost:8083/artifactory/; proxy_pass http://localhost:8083/; } }