无需写入IP地址即可连接WAMP服务器

无需写入IP地址即可连接WAMP服务器

问题描述:

I wrote a database for our R&D records. I put it to an analysis machine which is on for all the time and configured it to be accessable only in our subnet.

I told my manager to enter 192.XXX.X.XX/database in his browser search bar to connect and he wanted to know if there is any chance of doing it like /someothername/database.

I am a mechanical engineer so that I don't have enough information about networks and databases. Is it possible to do that with WAMP, if so, how can I do it?

You have to link your computer name in the URL if I remember. Here you go: https://*.com/a/22805501/4891259

The quick way to do it (best if only a limited number of machines need to access your database) is to create an entry in the client computer(s) HOST file:

Agree on a domain name with your manager, and add an entry that points to the IP of the computer that serves your database in each client computer's HOST:

192.XXX.XXX.XXX someothername

See Wikipedia for more information on the HOST file and where to find it in various operating systems.

You can then access your DB in a browser like so http://someothername/database

Note that you may need to flush the DNS cache and/or reboot the client computers for this to take effect.