Reputation: 639
I have my web application deployed in tomcat. Right now its accessed using the IP in the URL.
http://IPaddress:8080/appname/index.html
I wanted to configure a domain name in the DNS server which maps to this IP name. My windows admin created a domain. But problem is I'm not able to use it directly. Its expecting the port number.
http://domain.com:8080/appname/index.html
My expectation :
http://domain.com --> http://IP:8080/appname/index.html
How do I configure so that my tomcat recognizes the domain name with out the port number.
Upvotes: 0
Views: 2313
Reputation: 22994
It's common to run Apache in front of Tomcat which could forward incoming port 80 requests to port 8080. You'd need to enable the mod_proxy
module in Apache and then you can configure Apache to forward the requests - something like this:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
ProxyPass /appname http://IPAddress:8080/appname
ProxyPassReverse /appname http://IPAddress:8080/appname
Then requests to http://domain.com/appname
will be forwarded to http://IPAddress:8080/appname
.
See the mod_proxy docs for more info.
Upvotes: 0
Reputation: 1
Probably you need to do a port forwarding on the router. Tell your admin that any requests coming to domain.com (IP) should be redirected to IP:8080 instead of IP:80
Upvotes: 0
Reputation: 3294
You have to change port from 8080
, to 80
. See https://stackoverflow.com/a/4758356/841176 for instructions.
Upvotes: 0