I have a Tomcat application. I have a public IP but I want to know how I can make it available on internet. Is it a network config or Tomcat config? I want to give a URL like www.somename.com and it should be able to redirect to my server ip and port for eg: 129.23.34.45:8080 on which my Tomcat is running.
1 Answers
That is a very general question. Please explain your setup. Are you self hosting it on your PC, or you have some sort of server. What OS do you use?
The general explanation would be to open the port on your firewall and put some kind of port forwarding on your router (port 80 to port 8080 would be expected). You can also change the port Tomcat is expecting connections from 8080 to 80, so you should only forward port 80 to port 80 on the inner network.
Here is a good explanation on how to reconfigure Tomcat:
http://www.mkyong.com/tomcat/how-to-change-tomcat-default-port/
Another thing you need is a domain name. You should find some that suits you and lease it for a period. After that you can bind it to your static ip address. You can do that at specialized providers such as GoDaddy, name.com or any other you get recommendations.
Here is how can you register a domain name:
http://www.thesitewizard.com/archive/registerdomain.shtml
This is the most general explanation you can get, not knowing your system setup or network setup. Of course, you should always consider just buying a hosting package with some hosting provider, depending on what kind of service are you providing.

- 4,851
- 1
- 34
- 56
-
I am hosting it on a server. It is on windows. There is no firewall issue. I have checked the firewall settings. The router is configured to forward the public ip+port request to my static ip on which tomcat is deployed. Now my only question is , can I access this public ip or a domain name is a must for me to access it from internet. – user1999099 Oct 07 '13 at 05:45
-
Now I am a bit lost. When you said static IP address, I assumed that you are referring to a public static IP address, not a static address in your own network. If you have a public, but not static address, I believe that a regular domain name will not work. You have to use some dynamic dns service, such as dyndns or no-ip.org to dynamically change the location a domain name is pointing to. However, this is not a way to go, and it is advisable that you get a public static address from your internet provider. You can probably get it for a small fee. – Aleksandar Stojadinovic Oct 07 '13 at 11:05
-
Hi Alex, Sorry for the confusion. My public ip address is the same as public static ip address.(it is static). I am able to ping this public static ip from anywhere in the internet. The issue is that it is not reaching my tomcat server ip and port further. Not sure what else is left in the network configuration. – user1999099 Oct 10 '13 at 07:54
-
Finally the problem is resolved and network configuration of the public ip is in such a way that the public ip is not accessible from within the network(lan) but it is accessible from outside. Not sure why it is like this.But now we are able to access the tomcat webapp using the public ip. We will be registering a domain name may be using godaddy or so – user1999099 Oct 10 '13 at 17:35