Edit Hosts file on Mac Mini Newbie

PC2MAC

Registered
Literally got the new MAC Mini out of the box a few minutes ago. Need to edit the hosts file, so I can give a fake domain for local web development.

Read many articles, but they all seem to miss the fundamentals for newbies.

First I created a new setting in NetInfo, with the host name and ip:

mysite.com 161.15.12.204

Second I went into emacs to edit the http.conf file.

This is where I got lost. According to the instructions, it should work but it does not. Can anyone provide a screenshot of how it should look after the changes?

HELP! :eek:
 
Have you tried simply editing the hosts file in the /etc/ directory?

Warning: I got little experience with this stuff. If it causes your machine to spew peanut butter or any other undesireable result, I'm sorry!
 
You don't need to bother with host files... Just make a new "machine" entry into Utilities > Net Info Manager.

:)
 
Keep in mind this is a fresh machine. I have nothing more than the standard software setup, so I don't know if I need something running first.

===================================
This is what I've done so far in NetInfo:

machines > mysite.com

Property/Value Pairs for mysite.com:

ip_address | 161.15.12.204
name | mysite.com
serves | ./local

===================================
Steps:
1. Did the unlock
2. Selected Machines
3. Duplicated a folder under machines
4. Set the properties/value pairs.

Huh... Under machines I only have 2 entries:
1. broadcasthost
2. mysite.com

Is this ok?
===================================

Lemme make sure we are talkin' bout the same thing just in case...

I have a site in development, the domain is not pointed there. It currently points to the live site.

Anyhoo.... I need my local machine to point to the ip address of the development site. The development site is NOT on my machine.

When I type in the domain (mysite.com), it keeps pointing to the live site and not the ip based development site.
 
Thanks for replies guys.

==================
Found this link from apple/support:

Mac OS X 10.2 or later

Edit the /private/etc/hosts file. For more information on how to use the hosts file, open Terminal and type: man hosts

Note: Editing this file requires root privileges.

http://docs.info.apple.com/article.html?artnum=88158

I used "sudo emacs /private/etc/hosts"

A file came up looking like this:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
161.15.12.204 mysite.com <----This is my entry, works like a charm!
::1 localhost
 
Okay... I think I heard somewhere that OS X only looks at NetInfor Manager if DNS lookups fail. (Seems that the hosts file is referenced BEFORE DNS.)

Since I only use NetInfo Manager for fake names that don't already exist in DNS, I've never had any issues.

Sorry if I caused any confusion.

:eek:
 
hello folks. i've tried everything possible via all the various e-mail programs available to os x, but haven't been able to figure this out:

i recently got verizon fiber optic (fios), and am unable to send out e-mail from any account except my mac.com account. i use a "pobox.com" account for all my mailing lists (all my spam comes to my pobox.com address), and would like to use the verizon.com address at some point for sending, but i keep getting smtp errors regarding "smtp relay denied."

what i'm wondering is if somehow the hosts designated within netinfo manager are somehow being attached to my outgoing e-mails to be checked to see if the sender matches the owner of the computer (or something to that effect).

verizon fios uses pppoe instead of dhcp, with the ppoe information configured with the router sofware. i have a small lan comprised of three macs, with each assigned its own local address. maybe there is somewhere i need to list the possible outgoing e-mail return addresses in the "network" preferences?

any help in this matter would be greatly appreciated.
 
Back
Top