Windows XP hosts file
-
I'm reading up on Linux server administration as I do all development in PHP on a dedicated Debian box -- but my IDE and everyday usage remains Windows based. It's incredible how much complexity Windows hides from you -- no wonder it's the success it is. Anyways, my two computers (one XP, the other Debian) are both in my own local network -- behind a firewall/NAT router. I'm reading up on the /etc/hosts file (under Debian) and I'm trying to figure out how to get my Windows machine to recognize 'localhost' as the Debian server -- instead of it's default. I don't have Apache installed on my Windows box -- but I test everything from it. My debian server doesn't even have monitor. :P What and where in Windows do I update to map the http://localhost or http://myhostname to the ip address 192.168.1.102 (which is the IP of my development server -- which I currently access as http://192.168.1.102). I can't find anything on what lookup tables need to be changed under Windows -- any ideas??? Cheers :)
I'm finding the only constant in software development is change it self.
-
I'm reading up on Linux server administration as I do all development in PHP on a dedicated Debian box -- but my IDE and everyday usage remains Windows based. It's incredible how much complexity Windows hides from you -- no wonder it's the success it is. Anyways, my two computers (one XP, the other Debian) are both in my own local network -- behind a firewall/NAT router. I'm reading up on the /etc/hosts file (under Debian) and I'm trying to figure out how to get my Windows machine to recognize 'localhost' as the Debian server -- instead of it's default. I don't have Apache installed on my Windows box -- but I test everything from it. My debian server doesn't even have monitor. :P What and where in Windows do I update to map the http://localhost or http://myhostname to the ip address 192.168.1.102 (which is the IP of my development server -- which I currently access as http://192.168.1.102). I can't find anything on what lookup tables need to be changed under Windows -- any ideas??? Cheers :)
I'm finding the only constant in software development is change it self.
Hosts file of course - C:\WINDOWS\System32\drivers\etc\hosts -Saurabh
-
I'm reading up on Linux server administration as I do all development in PHP on a dedicated Debian box -- but my IDE and everyday usage remains Windows based. It's incredible how much complexity Windows hides from you -- no wonder it's the success it is. Anyways, my two computers (one XP, the other Debian) are both in my own local network -- behind a firewall/NAT router. I'm reading up on the /etc/hosts file (under Debian) and I'm trying to figure out how to get my Windows machine to recognize 'localhost' as the Debian server -- instead of it's default. I don't have Apache installed on my Windows box -- but I test everything from it. My debian server doesn't even have monitor. :P What and where in Windows do I update to map the http://localhost or http://myhostname to the ip address 192.168.1.102 (which is the IP of my development server -- which I currently access as http://192.168.1.102). I can't find anything on what lookup tables need to be changed under Windows -- any ideas??? Cheers :)
I'm finding the only constant in software development is change it self.
c:\WINDOWS\system32\drivers\etc\ hosts file is in there
:..::. Douglas H. Troy ::..
Bad Astronomy |VCF|wxWidgets|WTL -
I'm reading up on Linux server administration as I do all development in PHP on a dedicated Debian box -- but my IDE and everyday usage remains Windows based. It's incredible how much complexity Windows hides from you -- no wonder it's the success it is. Anyways, my two computers (one XP, the other Debian) are both in my own local network -- behind a firewall/NAT router. I'm reading up on the /etc/hosts file (under Debian) and I'm trying to figure out how to get my Windows machine to recognize 'localhost' as the Debian server -- instead of it's default. I don't have Apache installed on my Windows box -- but I test everything from it. My debian server doesn't even have monitor. :P What and where in Windows do I update to map the http://localhost or http://myhostname to the ip address 192.168.1.102 (which is the IP of my development server -- which I currently access as http://192.168.1.102). I can't find anything on what lookup tables need to be changed under Windows -- any ideas??? Cheers :)
I'm finding the only constant in software development is change it self.
-
I'm reading up on Linux server administration as I do all development in PHP on a dedicated Debian box -- but my IDE and everyday usage remains Windows based. It's incredible how much complexity Windows hides from you -- no wonder it's the success it is. Anyways, my two computers (one XP, the other Debian) are both in my own local network -- behind a firewall/NAT router. I'm reading up on the /etc/hosts file (under Debian) and I'm trying to figure out how to get my Windows machine to recognize 'localhost' as the Debian server -- instead of it's default. I don't have Apache installed on my Windows box -- but I test everything from it. My debian server doesn't even have monitor. :P What and where in Windows do I update to map the http://localhost or http://myhostname to the ip address 192.168.1.102 (which is the IP of my development server -- which I currently access as http://192.168.1.102). I can't find anything on what lookup tables need to be changed under Windows -- any ideas??? Cheers :)
I'm finding the only constant in software development is change it self.
Hockey wrote:
I'm trying to figure out how to get my Windows machine to recognize 'localhost' as the Debian server
Isn't localhost a special name or something? You could run into all sorts of problems with other applications on your Windows machine if you tell it localhost is actually somewhere else. Can't you access your Debian machine by it's own network name? At least that way you won't confuse anything that's expecting localhost to actually be the localhost - including yourself in six months time. edited for grammar
Sunrise Wallpaper Project | The StartPage Randomizer | The Windows Cheerleader
modified on Friday, March 28, 2008 2:31 PM
-
I'm reading up on Linux server administration as I do all development in PHP on a dedicated Debian box -- but my IDE and everyday usage remains Windows based. It's incredible how much complexity Windows hides from you -- no wonder it's the success it is. Anyways, my two computers (one XP, the other Debian) are both in my own local network -- behind a firewall/NAT router. I'm reading up on the /etc/hosts file (under Debian) and I'm trying to figure out how to get my Windows machine to recognize 'localhost' as the Debian server -- instead of it's default. I don't have Apache installed on my Windows box -- but I test everything from it. My debian server doesn't even have monitor. :P What and where in Windows do I update to map the http://localhost or http://myhostname to the ip address 192.168.1.102 (which is the IP of my development server -- which I currently access as http://192.168.1.102). I can't find anything on what lookup tables need to be changed under Windows -- any ideas??? Cheers :)
I'm finding the only constant in software development is change it self.
Hockey wrote:
I'm trying to figure out how to get my Windows machine to recognize 'localhost' as the Debian server
You should never do that. What exactly are you trying to accomplish with that?
John
-
Hockey wrote:
I'm trying to figure out how to get my Windows machine to recognize 'localhost' as the Debian server
You should never do that. What exactly are you trying to accomplish with that?
John
-
I'm reading up on Linux server administration as I do all development in PHP on a dedicated Debian box -- but my IDE and everyday usage remains Windows based. It's incredible how much complexity Windows hides from you -- no wonder it's the success it is. Anyways, my two computers (one XP, the other Debian) are both in my own local network -- behind a firewall/NAT router. I'm reading up on the /etc/hosts file (under Debian) and I'm trying to figure out how to get my Windows machine to recognize 'localhost' as the Debian server -- instead of it's default. I don't have Apache installed on my Windows box -- but I test everything from it. My debian server doesn't even have monitor. :P What and where in Windows do I update to map the http://localhost or http://myhostname to the ip address 192.168.1.102 (which is the IP of my development server -- which I currently access as http://192.168.1.102). I can't find anything on what lookup tables need to be changed under Windows -- any ideas??? Cheers :)
I'm finding the only constant in software development is change it self.
Since you've already been told where the HOSTS file is and why what you want to do is a bad idea, I'll just add that you need to reboot to make any unwise changes stick.
Otherwise [Microsoft is] toast in the long term no matter how much money they've got. They would be already if the Linux community didn't have it's head so firmly up it's own command line buffer that it looks like taking 15 years to find the desktop. -- Matthew Faithfull
-
Since you've already been told where the HOSTS file is and why what you want to do is a bad idea, I'll just add that you need to reboot to make any unwise changes stick.
Otherwise [Microsoft is] toast in the long term no matter how much money they've got. They would be already if the Linux community didn't have it's head so firmly up it's own command line buffer that it looks like taking 15 years to find the desktop. -- Matthew Faithfull
or just issue the command "ipconfig /flushDNS" (because the Windows XP "DNS Client" service caches the hosts file)
Steve
-
or just issue the command "ipconfig /flushDNS" (because the Windows XP "DNS Client" service caches the hosts file)
Steve
I'll have to keep that in mind the next time I run across an add so obnoxious that just having my browser hide it from view isn't an acceptable solution.
Otherwise [Microsoft is] toast in the long term no matter how much money they've got. They would be already if the Linux community didn't have it's head so firmly up it's own command line buffer that it looks like taking 15 years to find the desktop. -- Matthew Faithfull
-
I'm reading up on Linux server administration as I do all development in PHP on a dedicated Debian box -- but my IDE and everyday usage remains Windows based. It's incredible how much complexity Windows hides from you -- no wonder it's the success it is. Anyways, my two computers (one XP, the other Debian) are both in my own local network -- behind a firewall/NAT router. I'm reading up on the /etc/hosts file (under Debian) and I'm trying to figure out how to get my Windows machine to recognize 'localhost' as the Debian server -- instead of it's default. I don't have Apache installed on my Windows box -- but I test everything from it. My debian server doesn't even have monitor. :P What and where in Windows do I update to map the http://localhost or http://myhostname to the ip address 192.168.1.102 (which is the IP of my development server -- which I currently access as http://192.168.1.102). I can't find anything on what lookup tables need to be changed under Windows -- any ideas??? Cheers :)
I'm finding the only constant in software development is change it self.
what you need to do is have a hosts file entry on xp that points to the ip address of your debian box and called something like "debianhost" or whatever .. then set up a virtual host in apache on the debian box that is called "debianhost" then it will work by typing in "debianhost" in the xp browser address bar ;)
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
-
Hockey wrote:
I'm trying to figure out how to get my Windows machine to recognize 'localhost' as the Debian server
Isn't localhost a special name or something? You could run into all sorts of problems with other applications on your Windows machine if you tell it localhost is actually somewhere else. Can't you access your Debian machine by it's own network name? At least that way you won't confuse anything that's expecting localhost to actually be the localhost - including yourself in six months time. edited for grammar
Sunrise Wallpaper Project | The StartPage Randomizer | The Windows Cheerleader
modified on Friday, March 28, 2008 2:31 PM
Good point. Didn't think of that. Although I was planning on using my debian server name dev-server I used localhost as an example.
I'm finding the only constant in software development is change it self.
-
Hockey wrote:
I'm trying to figure out how to get my Windows machine to recognize 'localhost' as the Debian server
You should never do that. What exactly are you trying to accomplish with that?
John
Haha...thats tow of you who noticed my error. Although I said localhost I really just used it as an example -- although I didn't think of the consequences of using localhost. :)
I'm finding the only constant in software development is change it self.
-
what you need to do is have a hosts file entry on xp that points to the ip address of your debian box and called something like "debianhost" or whatever .. then set up a virtual host in apache on the debian box that is called "debianhost" then it will work by typing in "debianhost" in the xp browser address bar ;)
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
l a u r e n wrote:
what you need to do is have a hosts file entry on xp that points to the ip address of your debian box and called something like "debianhost" or whatever .. then set up a virtual host in apache on the debian box that is called "debianhost"
When I setup my server I was prompted for a host name, which I choose "dev-server" to distinguish from my "dev-desktop" and "home-desktop" and "home-mobile". Ideally I want each computer to be able to access the debian server "dev-server" via 'http://dev-server' All computers, with the exception of 'dev-server' are running XP home or Pro -- but I've never actually bothered to investgiate how to change the mappings to support this, I just jump on the computer and enter 'http://192.168.1.102' So I basically have to update each 'hosts' file on each WIndows PC to point to http://192.168.1.102
I'm finding the only constant in software development is change it self.
-
Haha...thats tow of you who noticed my error. Although I said localhost I really just used it as an example -- although I didn't think of the consequences of using localhost. :)
I'm finding the only constant in software development is change it self.
Hockey wrote:
Haha...thats tow of you who noticed my error. Although I said localhost I really just used it as an example -- although I didn't think of the consequences of using localhost
Nice recovery... ;P
Sunrise Wallpaper Project | The StartPage Randomizer | The Windows Cheerleader
-
l a u r e n wrote:
what you need to do is have a hosts file entry on xp that points to the ip address of your debian box and called something like "debianhost" or whatever .. then set up a virtual host in apache on the debian box that is called "debianhost"
When I setup my server I was prompted for a host name, which I choose "dev-server" to distinguish from my "dev-desktop" and "home-desktop" and "home-mobile". Ideally I want each computer to be able to access the debian server "dev-server" via 'http://dev-server' All computers, with the exception of 'dev-server' are running XP home or Pro -- but I've never actually bothered to investgiate how to change the mappings to support this, I just jump on the computer and enter 'http://192.168.1.102' So I basically have to update each 'hosts' file on each WIndows PC to point to http://192.168.1.102
I'm finding the only constant in software development is change it self.
not so no ... the server name isnt necessarily going to work like that ... you have to set up a virtual host on the debian box called "dev-server" instead of "debianhost" as i said before ... make sure the hosts file on xp has that as a name for the ip address of the debian box i use this setup all the time to test things on xp except i develop on linux and use vnc to go to a windows box on the network and from there i can browse back to the dev server ;)
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
-
Haha...thats tow of you who noticed my error. Although I said localhost I really just used it as an example -- although I didn't think of the consequences of using localhost. :)
I'm finding the only constant in software development is change it self.
And I thought you were trying some bizarre firewall setup...
John
-
Hockey wrote:
Haha...thats tow of you who noticed my error. Although I said localhost I really just used it as an example -- although I didn't think of the consequences of using localhost
Nice recovery... ;P
Sunrise Wallpaper Project | The StartPage Randomizer | The Windows Cheerleader
try{
Attempt to map each node to localhost
}
catch(Exception){
That's not really what I meant
}Cheers :)
I'm finding the only constant in software development is change it self.
-
not so no ... the server name isnt necessarily going to work like that ... you have to set up a virtual host on the debian box called "dev-server" instead of "debianhost" as i said before ... make sure the hosts file on xp has that as a name for the ip address of the debian box i use this setup all the time to test things on xp except i develop on linux and use vnc to go to a windows box on the network and from there i can browse back to the dev server ;)
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
That mad me dizzy! :-D
-
not so no ... the server name isnt necessarily going to work like that ... you have to set up a virtual host on the debian box called "dev-server" instead of "debianhost" as i said before ... make sure the hosts file on xp has that as a name for the ip address of the debian box i use this setup all the time to test things on xp except i develop on linux and use vnc to go to a windows box on the network and from there i can browse back to the dev server ;)
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
The server name is separate from the hostname, the latter being configure via Apache or similar, correct? When you say virtual host, you mean a virtual host with Apache? Sorry for the lame question, but I'm trying to figure out how Email and DNS all play togather and it's proving to be quite a discombobulating experience. :P
I'm finding the only constant in software development is change it self.