[英]How do I choose the URL for my Spring Boot webapp without port number?
I have production tomcat server running on 8080 port with few war files.我有在 8080 端口上运行的生产 tomcat 服务器,几乎没有战争文件。 Now, I have created a vaadin/spring-boot jar, and I need to deploy it in that server.
现在,我已经创建了一个 vaadin/spring-boot jar,我需要将它部署在该服务器中。 I have changed the embedded port of spring-boot application to 8082. Its working fine, but the URL is showing like - localhost:8082/statprojectdemo .
我已将 spring-boot 应用程序的嵌入式端口更改为 8082。它工作正常,但 URL 显示为 - localhost:8082/statprojectdemo 。
And current requirement demands that 8082 should not be seen in the URL.并且当前的要求要求 8082 不应出现在 URL 中。 So, Is there anyway I can use the URL as localhost:/statprojectdemo instead of mentioning port number.
所以,无论如何我可以使用 URL 作为localhost:/statprojectdemo而不是提及端口号。
Note* - I can't use port number 8080 or 80 as my production tomcat is running on that.注意* - 我不能使用端口号 8080 或 80,因为我的生产 tomcat 正在运行。
The port number is hard part of the url.端口号是 url 的硬部分。 So there is no way to direct leave it.
所以没有办法直接离开它。
Like Jens said, you need to set up a proxy server that listens on yoururl.com:80/statprojectdemo and communicates with that server on 8082.就像 Jens 说的,你需要设置一个代理服务器来监听 yoururl.com:80/statprojectdemo 并在 8082 上与该服务器通信。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.