7 Replies Latest reply on Aug 10, 2006 7:20 AM by Newsgroup_User

    Virtual Hosts on a Mac

    Level 7
      I'm trying to set up Apache virtual hosts on my new MacBook Pro, and I
      think I'm almost there, but I'm hitting a snag somewhere. I get the
      standard Apache greeting when I type http://localhost/ into my browser,
      but I when I type in the name of one of my websites - http://Geobop/ -
      it defaults to my ONLINE website, www.geobop.org.

      Here are the steps I followed...

      I copied my websites from my PC, locating them at
      /Library/Webserver/Documents. So the site I'm experimenting with is at
      /Library/Webserver/Documents/Geobop.

      I copied my httpd.conf file to my Desktop, modified it with TextEdit,
      then used Terminal to copy it back to its original location
      (/private/etc/httpd), so it now looks like this:

      NameVirtualHost *:80

      <VirtualHost *:80>
      ServerName Geobop
      ServerAlias Geobop *.Geobop
      DocumentRoot /Library/Webserver/Documents/Geobop
      </VirtualHost>

      I also opened NetInfo Manager and added Geobop under "machines". So
      under machines, I now have the following...

      broadcasthost
      Geobop
      localhost
      XAMPP (which I'll try to delete)

      In the bottom window, Geobop and localhost both register 127.0.0.1 for
      ip_address, ./local for "serves."

      Any idea where I went wrong? Thanks.

      --
      www.geobop.org - Family Websites
      www.invisible-republic.org - Adult political websites (Mature adults only)
        • 1. Re: Virtual Hosts on a Mac
          Level 7
          You do realise this is the Macromedia Dreamweaver forums - don't you?

          "David Blomstrom" <david_blomstrom@yahoo.com> wrote in message
          news:eb605k$tp$1@forums.macromedia.com...
          > I'm trying to set up Apache virtual hosts on my new MacBook Pro,


          • 2. Re: Virtual Hosts on a Mac
            Level 7
            "geobop" will need to be in your local DNS or your machine's hosts file for
            this to work. Don't have a Mac in front of me at the moment to tell you
            where the hosts file resides. You may have to do a search for it.
            Generally, if your machine can't resolve "geobop" as a local resource, the
            browser is going to search through all the normal www's (.com, .net, .org)
            to see if it can resolve it before it stops at the "site not found" error.

            Best regards,
            Chris


            • 3. Re: Virtual Hosts on a Mac
              Level 7
              > I'm trying to set up Apache virtual hosts on my new MacBook Pro, and I think
              > I'm almost there, but I'm hitting a snag somewhere.

              David Powers explains all both for Windows and for the Mac in his excellent
              book PHP for Dreamweaver 8. (page 87)

              --
              Regards,
              Adriana.
              [ put out the rubbish if you need to reach me by e-mail ]
              www.spinsister.nl


              • 4. Re: Virtual Hosts on a Mac
                Level 7
                Brendon wrote:
                > You do realise this is the Macromedia Dreamweaver forums - don't you?
                >
                > "David Blomstrom" <david_blomstrom@yahoo.com> wrote in message
                > news:eb605k$tp$1@forums.macromedia.com...
                >> I'm trying to set up Apache virtual hosts on my new MacBook Pro,
                >
                >

                You must be a newbie; we discuss everything here, from PHP to ASP to
                Macs. Stick around and enjoy! :)

                --
                www.geobop.org - Family Websites
                www.invisible-republic.org - Adult political websites (Mature adults only)
                • 5. Re: Virtual Hosts on a Mac
                  Level 7
                  Chris In Madison wrote:
                  > "geobop" will need to be in your local DNS or your machine's hosts file for
                  > this to work. Don't have a Mac in front of me at the moment to tell you
                  > where the hosts file resides. You may have to do a search for it.
                  > Generally, if your machine can't resolve "geobop" as a local resource, the
                  > browser is going to search through all the normal www's (.com, .net, .org)
                  > to see if it can resolve it before it stops at the "site not found" error.
                  >
                  > Best regards,
                  > Chris
                  >
                  >

                  Thanks, Chris. I just tracked down the hosts file, and the pieces are
                  beginning to fall in place. I'm still previewing the wrong page, but at
                  least it's a LOCAL wrong page. :)

                  --
                  www.geobop.org - Family Websites
                  www.invisible-republic.org - Adult political websites (Mature adults only)
                  • 6. Re: Virtual Hosts on a Mac
                    Level 7
                    A.Translator wrote:
                    >> I'm trying to set up Apache virtual hosts on my new MacBook Pro, and I
                    >> think I'm almost there, but I'm hitting a snag somewhere.
                    >
                    > David Powers explains all both for Windows and for the Mac in his
                    > excellent book PHP for Dreamweaver 8. (page 87)
                    >

                    Thanks for the tip; for some reason, I thought his book focused on PC's
                    only.

                    --
                    www.geobop.org - Family Websites
                    www.invisible-republic.org - Adult political websites (Mature adults only)
                    • 7. Re: Virtual Hosts on a Mac
                      Level 7
                      > If all of this bothers you, you can always use a little discipline and
                      > just ignore threads that don't interest you.

                      You could also preface your subject with the 'OT:' which should resolve
                      complaints like that.

                      -Darrel