Apache, is it possible to remove requirement for ip address?

Caporegime
Joined
12 Mar 2004
Posts
29,919
Location
England
I'm running apache on a lan server which is used to access a database and I was wondering if there was any way to remove the requirement to enter an ip address to access the webpage without having to make changes to each local computer, eg so that you can type "database" in the browser for example rather than "192.168.1.100/database"? Or is this not possible without routing all internet access through the server?
 
Associate
Joined
5 Jan 2003
Posts
753
Location
Norfolk
Setup a DNS alias/cname to 192.168.1.100 and you should be good.
If you just want it on your local machine add it to your hosts file,

Code:
1. Click Start -> All Programs -> Accessories

2. Right click Notepad and select Run as administrator

3. Click Continue on the "Windows needs your permission" UAC window.

4. When Notepad opens Click File -> Open

5. In the filename field type C:\Windows\System32\Drivers\etc\hosts

6. Click Open

7. Add
Code:
192.168.1.100 database

8. Then save it.

Might need to update the webserver too, otherwise you'll have to enter database/database
 
Back
Top Bottom