如何将 SonarQube-URL 从 "http://localhost:9000" 更改为 "http://XXX:9000" 之类的东西?

How to change the SonarQube-URL from "http://localhost:9000" to something like "http://XXX:9000"?

我想用 SonarQube 分析 Java 个项目。

SonarQube 运行 在服务器上。我可以远程连接到该服务器。 SonarQube 可在“http://localhost:9000". I want now to change that URL to something like "http://XXX:9000". I read that this is possible with the "Server base URL"-field under "Administration" --> "General Settings" in SonarQube. But it doesn't work... If I type this in my browser, then only the loading screen is shown. On "http://localhost:9000”上访问,它仍然可以访问。为什么??? 那么,如何更改 URL 以在另一个 URL 上到达 SonarQube UI?

PS: SonarQube-Version is 7.9.1.

如果您只想在本地访问您的服务器,您可以在 hosts 文件中添加 XXX。然后对 XXX 的所有网络请求将映射到 localhost。但是,如果您希望通过地址 XXX 从互联网访问它,您需要注册 DNS 并将其设置为映射到您的服务器