Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DNS and Web Application Resolution

 
Ron Ingram
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I've registered a domain and have godaddy hosting setup. The problem is, the dns entry points to the actual static IP address to the server and in order to get to the web app, I have to add :8080/Folder

So I want access to my site by typing www.domainname.com and it point directly to my site. Worse case scenario, I would like the port 8080 requirement in the URL to be omitted.

Please help, thanks
 
Karthik Shiraly
Bartender
Posts: 1208
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it a shared server, or is it a virtual/dedicated server?
On a virtual/dedicated server, you can change Tomcat connector port to default HTTP port 80 (edit server.xml), and change your webapp folder name or WAR name to "ROOT".
If it's a shared server, it's best to ask the hosting helpdesk.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18165
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DNS only resolves the hostname. If you don't provide a portname explicitly on a URL, the web browser tries port 80 (http) or 443 (https).

There are 2 ways to simplify user-supplied URLs.

1. Employ a proxy such as Apache httpd web server to forward simple port-80 requests to the Tomcat server, rewriting the URL as needed.

2. Setup Tomcat to serve port 80 and make the webapp be the root webapp (warning: this is a security risk!).

 
Ron Ingram
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you to both for your time. I will apply it all today.

 
Karthik Shiraly
Bartender
Posts: 1208
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote: (warning: this is a security risk!).

I was not aware that deploying tomcat as a front facing server is a security risk. Can you please elaborate how it is so? Is fronting with httpd the only solution to those risks?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18165
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Karthik Shiraly wrote:
Tim Holloway wrote: (warning: this is a security risk!).

I was not aware that deploying tomcat as a front facing server is a security risk. Can you please elaborate how it is so? Is fronting with httpd the only solution to those risks?


Tomcat itself is quite secure. However, unlike Apache httpd, Tomcat cannot serve up port 80 or 443 without running as root. which means that if someone does exploit Tomcat, they pretty much own your server. Apache httpd starts as root in order to obtain those (protected) ports, but normally then drops down and operates under a more restricted userid.
 
Karthik Shiraly
Bartender
Posts: 1208
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, Tim.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic