Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Perl / January 2005



Tip: Looking for answers? Try searching our database.

catnip.local (redirect)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rich Morin - 06 Jan 2005 16:51 GMT
My spouse has, at her workplace, a Mac OS X machine with web sharing
turned on. This machine is, therefore, reachable on the internal
company LAN as either http://catnip.local or http://catnip.company.com

When she works from home, she accesses the company network via VPN.
The  machine is still accessible as http://catnip.company.com.

Unfortunately, many of the links automatically convert too URLs
beginning catnip.local.  Via VPN (the way she does it), there is
no catnip.local.

Does anyone know where this redirection to catnip.local is stored and
whether (how) she can make it stop?

-r
Signature

email: rdm@cfcl.com; phone: +1 650-873-7841
http://www.cfcl.com        - Canta Forda Computer Laboratory
http://www.cfcl.com/Meta   - The FreeBSD Browser, Meta Project, etc.
http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series

Gregg R . Allen - 06 Jan 2005 21:08 GMT
I'm not sure where it's being stored, it's probably being cached in the
browser somewhere.  If you edit the file /etc/hosts
and place an entry such as:

catnip.local    12.34.56.78

where 12.34.56.78 is the IP address of catnip.company.com.  This can be
discovered by either nslookup catnip.company.com
or dig catnip.company.com

The computer might need to be rebooted after editing the hosts file.

Gregg Allen

> My spouse has, at her workplace, a Mac OS X machine with web sharing
> turned on. This machine is, therefore, reachable on the internal
[quoted text clipped - 11 lines]
>
> -r
Jeff Lowrey - 06 Jan 2005 21:19 GMT
I might actually look at the apache configuration, and see if it's using
ServerName=catnip.local, and fix that.

-jeff

At 04:08 PM 1/6/2005, Gregg R.Allen wrote:
>I'm not sure where it's being stored, it's probably being cached in the
>browser somewhere.  If you edit the file /etc/hosts
[quoted text clipped - 30 lines]
>>http://www.cfcl.com/Meta   - The FreeBSD Browser, Meta Project, etc.
>>http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series
Chris Devers - 06 Jan 2005 23:52 GMT
> I might actually look at the apache configuration, and see if it's
> using ServerName=catnip.local, and fix that.

This sounds like the right solution to me.

From what I can tell, if the ServerName directive is undefined in the
Apache configuration, then it will default to the host name, which the
Mac is going to see as `hostname`.local. If she manually specifies --

   ServerName catnip.company.com

-- in /etc/httpd/httpd.conf, then restarts Apache with a --

  $ sudo apachectl configtest && sudo apachectl restart

-- then everything should begin working properly.

Mucking around with the hosts file is the wrong way to fix this. For one
thing, Panther doesn't even necessarily pay attention to it (by default
it ignores it and most other files in /etc, if I remember right), but
more importantly you're fixing the symptom (redirecting the host name)
rather than the real problem (apache should use a portable name). Fix
the real problem and the symptom will go away.

Signature

Chris Devers

Conrad Schilbe - 06 Jan 2005 21:34 GMT
Gregg R.Allen wrote:

> I'm not sure where it's being stored, it's probably being cached in
> the browser somewhere.  If you edit the file /etc/hosts
[quoted text clipped - 7 lines]
>
> The computer might need to be rebooted after editing the hosts file.

You shouldn't need a reboot. Also... just as an idea, did you check that
the links aren't hard coded?

The difference is that a link such as: <a href="/some/path/file.html">
will be requested from the root directory of the current domain, while
<a href="http://catnip.local/some/path/file.html"> would request the
file from the host catnip.local.

This likely to trivial of a solution, just thought I'd ask.

>> Unfortunately, many of the links automatically convert too URLs
>> beginning catnip.local.  Via VPN (the way she does it), there is
>> no catnip.local.

If that's not the issue, you could try the host file as mentioned
previously, also apache has it's own host configuration directives in
/etc/httpd/httpd.conf

-- cs
Joel Rees - 07 Jan 2005 14:52 GMT
Hmm. All this made me look at how I have this box set up and I discover
that what I was about to tell you (and what I've done to a box I'm
borrowing from work) was wrong. I'lll try to reconstruct things. I hope
I make sense.

> My spouse has, at her workplace, a Mac OS X machine with web sharing
> turned on. This machine is, therefore, reachable on the internal
> company LAN as either http://catnip.local or http://catnip.company.com

If my memory is right, I used to get that back in the days of 10.0 when
the link went down or the ethernet cable came slightly loose or
whatnot. /etc/hosts was only referenced during single user mode back
then or something. I can't remember if using the machines "domain" in
netinfo was the cause or the cure. But if you look under /machines in
the Applications/Utilities/netinfo GUI widget, you'll notice that there
are two entries that look very suspicious.

At one time I had added an entry under /machines for the name of this
box. I duplicated the localhost entry and edited it in a way that
seemed appropriate. Sometime between 10.0 and 10.2.8, Apple fully
restored the functionality of /etc/hosts, so I presently have a line
something like

    10.2.40.49    reiisi reiisi.homedns.org

in /etc/hosts, instead.

> When she works from home, she accesses the company network via VPN.
> The  machine is still accessible as http://catnip.company.com.
>
> Unfortunately, many of the links automatically convert too URLs
> beginning catnip.local.  Via VPN (the way she does it), there is
> no catnip.local.

I was going to mumble something here, but I need to hit the hay. I'm
not sure I'm making any sense anymore anyway.

> Does anyone know where this redirection to catnip.local is stored and
> whether (how) she can make it stop?
>
> -r
Joel Rees - 08 Jan 2005 01:34 GMT
> My spouse has, at her workplace, a Mac OS X machine with web sharing
> turned on. This machine is, therefore, reachable on the internal
> company LAN as either http://catnip.local or http://catnip.company.com
[....]

other places to look at for grins and giggles --

man hostname
man domainname
cat /etc/hostconfig

(/etc/hostconfig is what actually tells the box to name itself
automatically, which is causing the use of the local domain, but don't
jump to the assumption that you should therefore change it from
automatic to catnip.company.com. I don't remember why I don't do that,
but I did think I had a good reason. Looking up "etc/hostconfig"+"mac
os x" at your favorite search engine might provide some clues.)

The biggest failing with mac os x is its biggest strength -- too much
indirection and delegation. It's often really difficult to figure out
where the buck stops. But it does "just work" for most people, and they
do seem to be making headway at sorting things out so that mere mortal
sysads can figure them out.

Have you asked/searched on Apple's boards and mailing lists? I'm pretty
the topic has floated there in the past.

--
Joel Rees
    Nothing to say today
    so I'll say nothing:
    Nothing.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.