Access application using name instead of IP address

Hello there,

I have 2 web application on 2 different Tomcat machines with static IP and my clients connect to these application by entering the ip address of the servers to access the application. Please the the attached image to get a better idea. Now my problem is the clients need to enter the IP of the machine to access the web application, how can the client access the app using some domain name like, www.app1.com or www.app2.com on a local network. I will appreciate any help.

cheers
Zolf
New-Mockup-2.png
zolfAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ios manCommented:
Nice blog with genuine information. Thanks alot.

bydia nox uktvnow
0
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
What you seem to be asking for, is someone to setup vanilla DNS for your two sites.

Simple searches will turn up many guides about how to do this + the summary is to setup two A records for the domains you mention above.

Likely you'll do this with your domain registrar, like GoDaddy or Namecheap.
0
masnrockCommented:
Since this appears to be internal traffic, all that needs to be done is to create 2 A records on your internal DNS server.

If external access was involved, then registering a domain might become necessary. Whether you have an domain name to use already or end up registering one, A records would be necessary.

So no matter what, you need A records. Where you put them depends on whether the users are internal or external.
0
Powerful Yet Easy-to-Use Network Monitoring

Identify excessive bandwidth utilization or unexpected application traffic with SolarWinds Bandwidth Analyzer Pack.

zolfAuthor Commented:
Thanks for your comments.

My setup is a private network, it will be accessed locally. I also dont have a DNS server in my network. Please give me suggestion on these.
0
Sajid Shaik MSr. System AdminCommented:
if you dont have DNS in your network then you have to add manually in machines

rightlcik note pad Run as administrator browse c:\windows\System32\Drivers\Etc... folder

hosts  - open it

add as following Ex : (assume the ip for app1 192.168.1.7 and app2 as 192.168.1.78) replace ip's with your own...

192.168.1.7 app1.com
192.168.1.78 app2.com

and save it...

this is the one way...

the other way is install dns server on the web serve ... and add the DNS to all clients ..

if all devices using the same gateway ... in the lan then you can configure the DNS records point to the web servers ... or you can publish them from the router.

al lthe best
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
masnrockCommented:
Hosts file would be your only solution. Since it's only two computers and a two entries for each, not a big deal. But if the network grows, recommend changing the strategy.
1
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
As masnrock said, use your /etc/hosts file for local network setup.

Problem is keeping /etc/hosts in sync across many machines, if required.

Far better to setup host records in real DNS for app1 + app2, so app1.foo.com + app2.foo.com so any client can connect + always get back the correct IP, even if that IP is a local 127.0.0.X IP which will make your management of IP resolution far simpler.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.