• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DNS and Web Application Resolution

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 1210
25
Android Python PHP C++ Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Saloon Keeper
Posts: 27853
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you to both for your time. I will apply it all today.

 
Karthik Shiraly
Bartender
Posts: 1210
25
Android Python PHP C++ Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 27853
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 1210
25
Android Python PHP C++ Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, Tim.
 
They worship nothing. They say it's because nothing is worth fighting for. Like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic