Bonjour, I am on ubuntu server 10.10 (maverick) (Kernel Linux 2.6.35-28-server), running tomcat 7.0.12
I do have access to all webapps that are bundle with tomcat (manager, host-manager, docs, etc) by entering a user and a password that are required while browsing to http://localhost/:8080/manager or 192.168.100.110:8080/manager from my server. I also have access from a PC on the LAN by browsing to 192.168.100.110:8080/manager requiring the same user and password.
I do get access to http://localhost/:8080/ or 192.168.100.110:8080/ from the server and from the LAN without any user and password getting the intro page of my tomcat installation.
Furthermore, I have deployed a webapp which I do have access to, browsing http://localhost/:8080/mywebapp or 192.168.100.110:8080/mywebapp on the server and from the LAN using the latter address. No user nor password are asked for mywebapp, which is what I should expect.
My server is behind a firewall that forwards request from WAN (ip:xxx.xxx.xxx.xxx) on port 8080 to 192.168.100.110:8080.
The problem I have is when I try to browse to mywebapp with the WAN address (xxx.xxx.xxx.xxx:8080/mywebapp), the system asked me for user and password which is not what I should expect. And it is not a user and password of tomcat? after several tentatives, I get the error "401 Unauthorized - Authorization required for the URL".
This problem occurs when I browse from the LAN with the WAN address and also from the WAN with the WAN address. It is the same user/password window asking for a user and a password than when I connect to localhost:8080/manager but is seems like no valid user nor password are working. At this point, the system should not be asking for a user an password.
As I said earlier, if I browse with the LAN address from the LAN their is no error, and if I browse from the server itself with either the LAN address or localhost it is working as expected.
I am not using Appache web server, only tomcat as web server. Their are no other service on 8080, here is the result of netstat -vtnl while tomcat is shutdown:
You provided a lot of information there, but the first question I have to ask is "What is the domain name listed in the popup login dialog's title bar"?
My first suspicion would be that the NAT process isn't routing to the server that you think it is.
An IDE is no substitute for an Intelligent Developer.
Joined: Apr 18, 2011
The domain name listed in the popup dialog's title bar is "The server xxx.xxx.xxx.xxx:8080 requires a username and password."
Joined: Apr 18, 2011
Your suspicion is real, when I try to go to localhost:8080/manager I get "The server 192.168.100.110:8080 at Tomcat Manager Application requires a username and password." Witch is different from what I get with xxx.xxx.xxx.xxx:8080. I tried the user and password of my router just in case and, guess, I been redirected to my route web interface! I thing some how, the router itself listen on 8080 even if the remote access is disable (remote management of the router is on port 8080). What I then tried is to change tomcat and router route port from 8080 to 8181 to see if the case is different. Yes it is. Now every thing seems to work as expected!!!
I do wish to thank you for your time and the effort to share your suspicion with me. Just one idea and I am in business again, I was really stock with this. The world need you and alike people, this is the value of sharing knowledges and experiences. I love you.