Unable to access Tomcat Apache server from remote machine using browser

18,606

Solution 1

Sounds like you have either a firewall on the machine with tomcat on it, you have its IP address wrong, or you are on a network which cant connect to it.

Can you access it on the machine it is on (ie, the one where you can access it as localhost:8080/myapps) with the remote address - http://192.168.2.2:8080/myapps? If not the address is wrong.

If the browser can't access 192.168.2.2 at all it means you have a firewall on that machine or that you are trying it from an address that doesn't start 192.168.

EDIT:

the address 192.168.x.x is a 'private address', which means nothing outside that address range can connect to it, and it can't go onto the internet. If you want to access it from the internet, you need a way to translate a public address (such as the one you listed xxx.125.xxx.158) to your private address, such as a router with port forwarding set up.

Without that you won't be able to connect to it.

Solution 2

I had the same problem in my windows 2012 server OS, I just have added an exception to port on which the tomcat apache was running.

for adding exception to port use the following step

1) Open Windows Firewall by clicking the Start button Picture of the Start button, and then clicking Control Panel. In the search box, type firewall, and then click Windows Firewall.

2) In the left pane, click Advanced settings. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.

3) In the Windows Firewall with Advanced Security dialog box, in the left pane, click Inbound Rules, and then, in the right pane, click New Rule.

4) Now select port and click next, now enter your port in specific local ports OR check on All local port. That's ALL

Share:
18,606
محمد خليل
Author by

محمد خليل

Updated on July 18, 2022

Comments

  • محمد خليل
    محمد خليل almost 2 years

    I am having Apache Tomcat 5.5 version installed on a remote machine. Application is using Java servlets and mysql database. I need to access that pages using a specific ip address(http://192.168.2.2:8080/myapps) on any system.

    Please provide me a references link or steps to access remote server web pages.

    Regards,