开发者

Apache Tomcat IP mapping to domain name

开发者 https://www.devze.com 2023-02-24 12:20 出处:网络
I am having apache tomcat server on my windows machine. Also I can access this server from other machines on the network.

I am having apache tomcat server on my windows machine. Also I can access this server from other machines on the network.

Now I want to map the IP+Port combination to a name ie currently I have to write http://10.x开发者_StackOverflowxx.xx.xx:8080/app_name but I want to access it as http://app_name

How can I go about it? Is there any solution which I can achieve by adding some mapping in apache server file? Also DNS server is not in my control, any way to get around this problem?

Thanks Rohit


By not specifying a port number, you are defaulting to port 80. Your options are to either modify your server to listen on port 80 or define an external load balancer VIP that does a PAT from port 80 to 8080.

If you take the VIP route, the hostname is defined on the load balancer. If you don't have that option and DNS isn't an option either, you could manually modify your hosts file with an alias. However, this would require all remote users to have your hostname - IP mapping in their local hosts files (making DNS the more manageable solution).


When user types the URL in browser, browser will establish TCP connection with web server in the port 80 by default in case of HTTP, 443 by default in case of HTTPS.

Yes. If Web server exposes any port other than default port, port has to be mentioned in the browser URL to connect and get the data.

0

精彩评论

暂无评论...
验证码 换一张
取 消