我們正在運行Sonatype的Nexus來存儲我們的所有版本,緩存我們的依賴關係等等。但是,我想從默認安裝的端口8081
URL移開,而不是通過Apache代理通過SSL託管它。我已經設置了Apache的mod_proxy
來代理它,這樣https://myserver.com/nexus
帶來了Nexus。我用下面的配置指令我的虛擬主機配置的內部:Sonatype Nexus:使用Apache的SSL代理
# Configure mod_proxy to be used for proxying URLs on this site to other URLs/ports on this server.
ProxyRequests Off
ProxyVia Off
ProxyPreserveHost On
<Proxy *>
AddDefaultCharset off
Order deny,allow
Allow from all
</Proxy>
# Proxy the Sonatype Nexus OSS web application running at http://localhost:8081/nexus
<Location /nexus>
ProxyPass http://localhost:8081/nexus
ProxyPassReverse http://localhost:8081/nexus
</Location>
這似乎在Running Nexus Behind a Proxy匹配的說明。但是,我無法清除Nexus中的「基本網址」設置:它不會讓我留下空白。
而一切主要作品:我可以在HTTPS URL訪問Nexus,登錄並執行大多數GUI功能。
然而,在登錄時,我得到以下警告消息:
WARNING: Base URL setting of
http://myserver.com/nexus
does not match your actual URL! If you're running Apache mod_proxy, here's more information on configuring Nexus with it.
而不是一切在GUI中的實際工作。到目前爲止,我已經注意到以下幾點:
- 系統供稿:提供了以下錯誤:
Problem accessing /nexus/service/local/feeds. Reason:
The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request
Nexus returned an error: ERROR 406: The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request
- Deleting Hosted Repositories: I went through and deleted several empty & unneeded repositories. However, after confirming the deletions, only the first was removed. I had to login to the
8081
site to delete any of the others.
Brian:謝謝!我試着將基本網址設置爲完整的「https」地址,該地址沒有起作用。然而,啓用**強制URL **與此相關。 –
Sonatype當前的文檔指出,Force Base URL複選框的初始意圖不再是有效的用例,並且可能會導致問題。但是,基本URL字段仍然看起來像是進行更改的地方。 http://books.sonatype.com/nexus-book/reference/install-sect-proxy.html –