从本地主机更改服务器URL [英] change server url from localhost
问题描述
我在Mac OS上安装了teamcity 9.1.我可以通过http://localhost:8111/
访问teamcity.我可以通过更改<Connector port="8111" protocol="org.apache.coyote.http11.Http11NioProtocol"
来更改文件TeamCity/conf/server.xml
中的端口.
I installed teamcity 9.1 on mac os. I can access teamcity via http://localhost:8111/
. I can change port in file TeamCity/conf/server.xml
by changing <Connector port="8111" protocol="org.apache.coyote.http11.Http11NioProtocol"
.
但是如何更改服务器网址,例如http://localhost:8111/
至http://teamcity.test:8111/
But how can I change server url e.g. http://localhost:8111/
to http://teamcity.test:8111/
我尝试从<Engine name="Catalina" defaultHost="localhost">
但是当我以./runAll.sh start
身份开始团队合作后,它仍然可以从http://localhost:8111/
访问,但不能从http://teamcity.test:8111/
But after I start teamcity as ./runAll.sh start
it stills can access from http://localhost:8111/
but not from http://teamcity.test:8111/
推荐答案
为了使服务器可以通过其他某些url/域名访问,您需要更新DNS条目以使地址解析为新服务器的IP地址.并且所有缓存的DNS结果过期后,所有客户端将自动使用新服务器.另外请注意,更改网址后,您需要:
In order to make server accessible by some other url/domain name you need to update the DNS entry to make the address resolve to the IP address of the new server and after all cached DNS results expire, all clients will be automatically using the new server. Also please note that after changing the URL you'll need to:
- 将代理切换到新的URL(需要更新 buildAgent.properties中的serverUrl属性).
- 在新服务器启动后,请不要忘记更新服务器URL 服务器配置管理页面.
- Upon new server startup do not forget to update Server URL on Server configuration administration page.
这篇关于从本地主机更改服务器URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!