Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Windows XP hosts file

Windows XP hosts file

Scheduled Pinned Locked Moved The Lounge
sysadminlinuxphpapachevisual-studio
24 Posts 11 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alex barylski
    wrote on last edited by
    #1

    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.

    S D L M J 7 Replies Last reply
    0
    • A alex barylski

      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.

      S Offline
      S Offline
      Saurabh Garg
      wrote on last edited by
      #2

      Hosts file of course - C:\WINDOWS\System32\drivers\etc\hosts -Saurabh

      1 Reply Last reply
      0
      • A alex barylski

        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.

        D Offline
        D Offline
        Douglas Troy
        wrote on last edited by
        #3

        c:\WINDOWS\system32\drivers\etc\ hosts file is in there


        :..::. Douglas H. Troy ::..
        Bad Astronomy |VCF|wxWidgets|WTL

        1 Reply Last reply
        0
        • A alex barylski

          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.

          L Offline
          L Offline
          led mike
          wrote on last edited by
          #4

          Hockey wrote:

          It's incredible how much complexity Windows hides from you

          I see you've been a CP member for six years. So all this time you thought everyone was just exaggerating?

          led mike

          1 Reply Last reply
          0
          • A alex barylski

            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.

            M Offline
            M Offline
            Miszou
            wrote on last edited by
            #5

            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

            A 1 Reply Last reply
            0
            • A alex barylski

              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.

              J Offline
              J Offline
              John M Drescher
              wrote on last edited by
              #6

              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

              L A 2 Replies Last reply
              0
              • J John M Drescher

                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

                L Offline
                L Offline
                leppie
                wrote on last edited by
                #7

                John M. Drescher wrote:

                You should never do that. What exactly are you trying to accomplish with that?

                Now you spoil the fun X|

                xacc.ide - now with IronScheme support
                IronScheme - 1.0 alpha 2 out now

                1 Reply Last reply
                0
                • A alex barylski

                  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.

                  D Offline
                  D Offline
                  Dan Neely
                  wrote on last edited by
                  #8

                  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

                  S 1 Reply Last reply
                  0
                  • D Dan Neely

                    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

                    S Offline
                    S Offline
                    Steve Mayfield
                    wrote on last edited by
                    #9

                    or just issue the command "ipconfig /flushDNS" (because the Windows XP "DNS Client" service caches the hosts file)

                    Steve

                    D 1 Reply Last reply
                    0
                    • S Steve Mayfield

                      or just issue the command "ipconfig /flushDNS" (because the Windows XP "DNS Client" service caches the hosts file)

                      Steve

                      D Offline
                      D Offline
                      Dan Neely
                      wrote on last edited by
                      #10

                      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

                      1 Reply Last reply
                      0
                      • A alex barylski

                        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.

                        L Offline
                        L Offline
                        l a u r e n
                        wrote on last edited by
                        #11

                        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"

                        A 1 Reply Last reply
                        0
                        • M Miszou

                          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

                          A Offline
                          A Offline
                          alex barylski
                          wrote on last edited by
                          #12

                          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.

                          1 Reply Last reply
                          0
                          • J John M Drescher

                            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

                            A Offline
                            A Offline
                            alex barylski
                            wrote on last edited by
                            #13

                            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.

                            M J 2 Replies Last reply
                            0
                            • L l a u r e n

                              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"

                              A Offline
                              A Offline
                              alex barylski
                              wrote on last edited by
                              #14

                              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.

                              L 1 Reply Last reply
                              0
                              • A alex barylski

                                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.

                                M Offline
                                M Offline
                                Miszou
                                wrote on last edited by
                                #15

                                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

                                A 1 Reply Last reply
                                0
                                • A alex barylski

                                  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.

                                  L Offline
                                  L Offline
                                  l a u r e n
                                  wrote on last edited by
                                  #16

                                  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"

                                  H A 3 Replies Last reply
                                  0
                                  • A alex barylski

                                    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.

                                    J Offline
                                    J Offline
                                    John M Drescher
                                    wrote on last edited by
                                    #17

                                    And I thought you were trying some bizarre firewall setup...

                                    John

                                    1 Reply Last reply
                                    0
                                    • M Miszou

                                      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

                                      A Offline
                                      A Offline
                                      alex barylski
                                      wrote on last edited by
                                      #18

                                      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.

                                      1 Reply Last reply
                                      0
                                      • L l a u r e n

                                        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"

                                        H Offline
                                        H Offline
                                        hlmechanic
                                        wrote on last edited by
                                        #19

                                        That mad me dizzy! :-D

                                        1 Reply Last reply
                                        0
                                        • L l a u r e n

                                          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"

                                          A Offline
                                          A Offline
                                          alex barylski
                                          wrote on last edited by
                                          #20

                                          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.

                                          L 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups