0

I have question regarding accessing my web application with some name,which is deployed on remote server.

Currently, I using following URL

http://160.110.67.181:8080/myapp

So, I'm wondering instead of above url, if user could access my application like

http://mytool.com/myapp

Then, it will be very good.

I tried editing hosts file on remote server. But, it didn't helped.

160.110.67.181:8080 mytool.com 
0

1 Answer 1

1

Remove the port number from your entry

The hosts file only resolves an ip address to a host or an alias of a host. Name resolution does not know or care about ports. Only the browser application cares about the port number.

You can then use http://mytool.com:8080/myapp to access the site. If the remote server was running on port 80 you could eliminate the port number from the URL for common web access.

3
  • Ok. Thats works.But, I have 2 questions 1. If I want to hide my port number of web app. Then how do I do this ? 2. Webserver is on remote machine,which means if user has to access my app, either he/she has to edit their hosts file or directly use ip address. Is there any way, by which they do not require to change their hosts file and even though, they can access my app on LAN
    – cool_ravi
    Apr 14, 2014 at 6:51
  • There is a way and that is to purchase a domain and point an A record to the IP address. There are free options for such domains but they won't be a tier 1 *.com domain. If you have a dynamic ip then you will need to use a dynamic update client to a service which supports it.
    – shrmn
    Apr 14, 2014 at 10:12
  • If you need access to the app only inside your local network, you can also set up a local DNS server, and then tell your local network DHCP server to give that DNS server's address to users. Apr 14, 2014 at 12:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .