本文介绍了如何从"http://localhost:9000"更改SonarQube-URL;类似于"http://XXX:9000"的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用SonarQube分析Java项目.

I want to analyze Java-projects with SonarQube.

SonarQube正在服务器上运行.我可以远程连接到该服务器.可在" http://localhost:9000 "上访问SonarQube.我现在想将该URL更改为" http://XXX:9000 ".我了解到,可以通过SonarQube中管理"->常规设置"下的服务器基本URL"字段来实现.但这不起作用...如果我在浏览器中键入此内容,则仅显示加载屏幕.在" http://localhost:9000 上仍然可以访问.为什么???那么,如何更改URL以在另一个URL上到达SonarQube UI?

SonarQube is running on a server. I can connect to that server remotly. SonarQube is accessible on "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" it is still reachable. Why???So, how can I change the URL to reach the SonarQube UI on another URL?

PS:SonarQube版本为7.9.1.

PS: SonarQube-Version is 7.9.1.

推荐答案

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

If you want just to access your server locally, you can add XXX in your hosts file. Then all network requests to XXX will be mapped to localhost. But if you want to make it accessible from the internet by address XXX you need to register DNS and set up it to map to your server

这篇关于如何从"http://localhost:9000"更改SonarQube-URL;类似于"http://XXX:9000"的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 20:49