【问题标题】:Nexus webapp, how to use / instead of /nexus for base URINexus webapp,如何使用 / 而不是 /nexus 作为基本 URI
【发布时间】:2013-10-22 20:58:29
【问题描述】:

我正在尝试在带有 OpenJDK 7 的 Ubuntu 12.04 上使用 2.6.3 构建新的 Nexus 服务器。

我有一个空的存储库在 8081 端口上运行,它前面的 nginx 在端口 80 上响应。

但该应用不会在http://nexus.example.net/ 上回复,而只会在http://nexus.example.net/nexus/ 上回复。根 / 发回 404。

我想也许 nexus.properties 中的 nexus-webapp 和 nexus-webapp-context-path 属性可以解决这个问题,但是当我更改它时,它会给我一个 sonatype-work/nexus 目录的通用目录列表。

【问题讨论】:

    标签: nexus


    【解决方案1】:

    这是您需要在/conf/nexus.properties 中编辑的内容:

    nexus-webapp=${bundleBasedir}/nexus
    nexus-webapp-context-path=
    

    上下文为空,但保留另一个,因为另一个告诉从哪里加载应用程序!

    【讨论】:

    • 帮我解决了!
    【解决方案2】:

    查看running Nexus behind a proxy 的章节并确保更新并强制Application Server Settings. 中的基本网址

    您可以在 /nexus 上下文中继续运行它,也可以不在。只需在 nginx 中调整您的代理/反向代理设置。

    【讨论】:

    • 天啊!是的,诀窍是更改 nexus-webapp-context-path 而不是 nexus-webapp。我正在寻找有关 nexus.properties 设置的文档,但没有连接到“代理背后”页面。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-08-18
    • 1970-01-01
    • 2021-04-07
    • 1970-01-01
    • 2018-01-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多