Re: A question about Localhost with Safari
Formerly Netinfo as I recall, now the local component of Open Directory / directory services. Database files are in /var/db/dslocal and are binary plists, except for an sqlite3 index file and a couple of files associated with it. _Looking_ at those directly (I wouldn’t modify anything directly without a backup!! Either GUI or the dscl command should be used to make changes) is reasonably straightforward, knowing their formats - just leave those alone those two files that “file” identifies only as “data”. /etc/hosts and NIS can be enabled (typically together, as I recall). Mixing master/slave NIS server is NOT compatible with Sun’s NIS (protocol differences? certainly different underlying data storage limitations, i.e. old dbm vs gdbm or db or whatever); but _clients_ need not be same OS as servers. On Jan 4, 2015, at 11:20 AM, William H. Magill mag...@mac.com wrote: On Jan 4, 2015, at 10:46 AM, Brandon Allbery allber...@gmail.com wrote: On Sun, Jan 4, 2015 at 10:34 AM, René J.V. rjvber...@gmail.com wrote: On Sunday January 04 2015 09:05:42 Brandon Allbery wrote: From the standpoint of DNS, localhost is fully qualified: it is not the short form of a name that is meaningful only in the context of a particular domain. AFAIK you need an entry in /etc/hosts in order for localhost to be defined, no? BIND9 at least comes with a local zone definition that includes localhost. as a name, with the usual mapping. That said, people *usually* get it from /etc/hosts... *but* OS X is a little weird in how/when it uses the hosts file. If one believes the contents of /etc/hosts -- OSX only consults it at boot time. Historically, OSX loaded all of the various unix like plain-text information files into a database. (NIS maybe?) I haven't played extensively with this sort of stuff since I retired back in 2003, (Apple makes it so easy to forget) but I assume that OSX (NeXTStep) has not gotten closer to UNIX(tm), but continued on its divergent path. T.T.F.N. William H. Magill mag...@icloud.com mag...@mac.com whmag...@gmail.com ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Sun, Jan 4, 2015 at 2:06 AM, William H. Magill mag...@mac.com wrote: It also appears that the function of the ServerName directive has changed. The current Apache manual http://httpd.apache.org/docs/2.2/mod/core.html#servername describes its syntax as requiring a FQDN -- which neither Localhost nor IP address constructs (127.0.0,1) really are. From the standpoint of DNS, localhost is fully qualified: it is not the short form of a name that is meaningful only in the context of a particular domain. It sounds like the problem is that Apple has moved to making IPv6 the default, even when only local IPv6 connectivity (ie. zeroconf/Bonjour) exists. I would expect this to have other knock-on effects, for example it will try to connect to IPv6 addresses returned by external DNS even though it cannot. Beyond that, it sounds like IPv6 loopback may not be being configured if only link-local addresses are configured; this seems like an Apple bug to me. -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Sun, Jan 4, 2015 at 10:34 AM, René J.V. rjvber...@gmail.com wrote: On Sunday January 04 2015 09:05:42 Brandon Allbery wrote: From the standpoint of DNS, localhost is fully qualified: it is not the short form of a name that is meaningful only in the context of a particular domain. AFAIK you need an entry in /etc/hosts in order for localhost to be defined, no? BIND9 at least comes with a local zone definition that includes localhost. as a name, with the usual mapping. That said, people *usually* get it from /etc/hosts... *but* OS X is a little weird in how/when it uses the hosts file. It sounds like the problem is that Apple has moved to making IPv6 the default, even when only local IPv6 connectivity (ie. zeroconf/Bonjour) exists. I would expect this to have other knock-on effects, for example it will try to connect to IPv6 addresses returned by external DNS even though it cannot. Beyond that, it sounds like IPv6 loopback may not be being configured if only link-local addresses are configured; this seems like an Apple bug to me. Hmmm, I did notice, already under 10.6.8, that zeroconf address resolution yielded IPv6 addresses for my Mac that cause issues (from a Linux host) when I'm connected to my TimeCapsule's WiFi network, which is configured to bridge the main router/modem's local network. Not sure if that's related, but it does help making me think of IPv6 as something that's not quite ready for wide-spread use without IT staff ... It'll be fine once commodity Internet and commodity routers/access points (aside from Apple's!) includes IPv6 connectivity. Currently, you'll find that getting IPv6 upstream is nearly impossible in many places / with many providers; most commodity routers don't handle IPv6, or require extra configuration to do so, even if you have it (or are only using link-local!); and this means you cannot configure IPv6 properly and many things can (not necessarily will) fail in weird ways. In this particular case, either Apple is not associating ::1 with the loopback adapter in link-local IPv6 mode or Apache is not configuring IPv6 (and therefore not listening on ::1) if it doesn't find a full IPv6 configuration; I can't say which. In the one you describe, I'm betting that something does not understand IPv6, so when Linux tries to use avahi (its version of zeroconf) to connect it fails. (Sadly, Bonjour includes IPv6 addresses in the zeroconf broadcast over IPv4, so other machines will indeed attempt to make IPv6 connections even when they're only receiving IPv4 zeroconf. I've seen this failure mode myself, and it is one reason my stuff is now on a separate network with local IPv6.) -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Jan 4, 2015, at 10:46 AM, Brandon Allbery allber...@gmail.com wrote: On Sun, Jan 4, 2015 at 10:34 AM, René J.V. rjvber...@gmail.com wrote: On Sunday January 04 2015 09:05:42 Brandon Allbery wrote: From the standpoint of DNS, localhost is fully qualified: it is not the short form of a name that is meaningful only in the context of a particular domain. AFAIK you need an entry in /etc/hosts in order for localhost to be defined, no? BIND9 at least comes with a local zone definition that includes localhost. as a name, with the usual mapping. That said, people *usually* get it from /etc/hosts... *but* OS X is a little weird in how/when it uses the hosts file. If one believes the contents of /etc/hosts -- OSX only consults it at boot time. Historically, OSX loaded all of the various unix like plain-text information files into a database. (NIS maybe?) I haven't played extensively with this sort of stuff since I retired back in 2003, (Apple makes it so easy to forget) but I assume that OSX (NeXTStep) has not gotten closer to UNIX(tm), but continued on its divergent path. T.T.F.N. William H. Magill mag...@icloud.com mag...@mac.com whmag...@gmail.com ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Sun, Jan 4, 2015 at 11:20 AM, William H. Magill mag...@mac.com wrote: BIND9 at least comes with a local zone definition that includes localhost. as a name, with the usual mapping. That said, people *usually* get it from /etc/hosts... *but* OS X is a little weird in how/when it uses the hosts file. If one believes the contents of /etc/hosts -- OSX only consults it at boot time. That comment is an approximation of the truth. But, while BSD API stuff follows similar rules to other Unixes (checks hosts first then the name service --- but since the name service isn't up yet at boot time, it only uses the hosts file), Cocoa API doesn't appear to do so. (I admit to not knowing exactly what that API does, just that it seems to be different.) -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
DNS is a protocol, not an API. To the extent that hosts is used, it's because developer of the software that implements the protocol chooses to use it. It's a PITA if it's not used - I quite commonly set up small networks in my own office, with static IPs hardwired into my hosts files. Michael David Crawford, Consulting Software Engineer mdcrawf...@gmail.com http://www.warplife.com/mdc/ Available for Software Development in the Portland, Oregon Metropolitan Area. On Sun, Jan 4, 2015 at 8:24 AM, Brandon Allbery allber...@gmail.com wrote: On Sun, Jan 4, 2015 at 11:20 AM, William H. Magill mag...@mac.com wrote: BIND9 at least comes with a local zone definition that includes localhost. as a name, with the usual mapping. That said, people *usually* get it from /etc/hosts... *but* OS X is a little weird in how/when it uses the hosts file. If one believes the contents of /etc/hosts -- OSX only consults it at boot time. That comment is an approximation of the truth. But, while BSD API stuff follows similar rules to other Unixes (checks hosts first then the name service --- but since the name service isn't up yet at boot time, it only uses the hosts file), Cocoa API doesn't appear to do so. (I admit to not knowing exactly what that API does, just that it seems to be different.) -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Sun, Jan 4, 2015 at 11:49 AM, Michael Crawford mdcrawf...@gmail.com wrote: DNS is a protocol, not an API. To the extent that hosts is used, it's because developer of the software that implements the protocol chooses to use it. That would be why I mentioned BSD API (used by most command line utilities) and Cocoa API (used by GUI stuff, or more generally anything using Apple's Foundation framework). While the BSD API does sit underneath Foundation, Cocoa APIs don't always simply wrap the BSD API. -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Sunday January 04 2015 10:46:53 Brandon Allbery wrote: It'll be fine once commodity Internet and commodity routers/access points (aside from Apple's!) includes IPv6 connectivity. Currently, you'll find that getting IPv6 upstream is nearly impossible in many places / with many providers; most commodity routers don't handle IPv6, or require extra configuration to do so, even if you have it (or are only using link-local!); and this means you cannot configure IPv6 properly and many things can (not necessarily will) fail in weird ways. Indeed, my LiveBox modem/router doesn't have IPv6 settings In this particular case, either Apple is not associating ::1 with the loopback adapter in link-local IPv6 mode or Apache is not configuring IPv6 (and therefore not listening on ::1) if it doesn't find a full IPv6 configuration; I can't say which. In the one you describe, I'm betting that something does not understand IPv6, so when Linux tries to use avahi (its version of zeroconf) to connect it fails. (Sadly, Bonjour includes IPv6 Avahi and zeroconf are just configuration-free address resolution protocols. Connecting to a retrieved address goes through the usual TCP/IP stack ;) IPv4 zeroconf. I've seen this failure mode myself, and it is one reason my stuff is now on a separate network with local IPv6.) What's weird is that my Mac uses the TimeCapsule's wired hub (the TimeCapsule itself is connected to the main router/modem via ethernet over the mains), so when my Linux box connects to the TC's WiFi it should be on the same sub sub network, i.e. communication between it and the Mac should go exclusively over the TimeCapsule. BIND9 at least comes with a local zone definition that includes localhost. as a name, with the usual mapping. That said, people *usually* get it from /etc/hosts... *but* OS X is a little weird in how/when it uses the hosts file. If one believes the contents of /etc/hosts -- OSX only consults it at boot time. I don't think so. I use /etc/hosts for avoiding phoning-home to certain hostnames, for hostname remapping and to add aliases to certain other hosts that have a fixed address. Works as one would expect it, and changes don't require a reboot to take effect. I've also not noticed a difference between command line utilities and native applications that presumably use the Foundation API (browsers, notably). And when I out-comment the localhost definition from /etc/hosts, I can no longer connect to that hostname. To be exhaustive, my /etc/resolv.conf contains search orange.fr nameserver 8.8.8.8 nameserver 192.168.1.1 R. ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Sun, Jan 4, 2015 at 12:23 PM, René J.V. rjvber...@gmail.com wrote: And when I out-comment the localhost definition from /etc/hosts, I can no longer connect to that hostname. That's because, while a nameserver often comes with a zone definition providing a localhost definition, publishing it is a no-no. So 8.8.8.8 will not serve it to you, whereas a local nameserver usually would. (Roughly the same rule as for the RFC1918 private address ranges.) -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Sunday January 04 2015 12:28:50 Brandon Allbery wrote: not serve it to you, whereas a local nameserver usually would. (Roughly the same rule as for the RFC1918 private address ranges.) Not the server running on my modem/router (192.168.1.1) in any case. But it could be that router just forwards requests to the ISP's DNS servers if they don't match the entries in the MAC/hostname table. R. ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Sun, Jan 4, 2015 at 1:14 PM, René J.V. rjvber...@gmail.com wrote: Not the server running on my modem/router (192.168.1.1) in any case. But it could be that router just forwards requests to the ISP's DNS servers if they don't match the entries in the MAC/hostname table. It does; it's not a real nameserver, just a (tiny) cache. Even with dd-wrt it will work that way unless you manually put together a real (as opposed to caching/forwarding) configuration for dnsmasq. -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
To add to the chatter: On Jan 3, 2015, at 13:41 , William H. Magill wrote: Did Apple change something in Yosemite/Safari so that localhost is no longer an accessible DNS address for Safari? I have no trouble ssh-ing to localhost on my system, but Safari always responds Can't connect to the Server. FWIW, i get this on my 10.6.8 system, which is more or less stock. Also, 'localhost' is defined in my /etc/hosts, as it came from the factory (with two IPv6 addresses and the usual IPv4 address). Justin -- Justin C. Walker, Curmudgeon at Large Institute for the Absorption of Federal Funds -- Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote. ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Sunday January 04 2015 13:10:30 Justin C. Walker wrote: I have no trouble ssh-ing to localhost on my system, but Safari always responds Can't connect to the Server. FWIW, i get this on my 10.6.8 system, which is more or less stock. Also, 'localhost' is defined in my /etc/hosts, as it came from the factory (with two IPv6 addresses and the usual IPv4 address). TWO IPv6 addresses? Could you paste the relevant lines here? Also, does your issue go away when you outcomment the IPv6 entries? R. ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Sun, Jan 4, 2015 at 4:23 PM, René J.V. rjvber...@gmail.com wrote: TWO IPv6 addresses? Could you paste the relevant lines here? Looks like there's an link-local address space reference in there as well as ::1, presumably because the loopback adapter does not implement IPv6 link-local autoconfig (why, indeed, should it?). fe80::1%lo0 localhost -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Jan 4, 2015, at 13:23 , René J.V. Bertin wrote: On Sunday January 04 2015 13:10:30 Justin C. Walker wrote: I have no trouble ssh-ing to localhost on my system, but Safari always responds Can't connect to the Server. FWIW, i get this on my 10.6.8 system, which is more or less stock. Also, 'localhost' is defined in my /etc/hosts, as it came from the factory (with two IPv6 addresses and the usual IPv4 address). TWO IPv6 addresses? Could you paste the relevant lines here? ::1 localhost fe80::1%lo0 localhost (as Brandon mentioned). Also, does your issue go away when you outcomment the IPv6 entries? It appears not. I quit Safari, made the edits, and restarted Safari, which exhibited the same behavior as above. It is possible, as suggested earlier, that the hosts file is queried only at startup, but I don't think that's the case (and in any case, I did not reboot :-}). To answer another question from earlier in the thread, I believe the database used by Mac OS X during the early years was a hold-over from NeXT days (netinfo?). I think it was essentially gone by the time 10.6 was released. HTH Justin -- Justin C. Walker Curmudgeon-at-large -- Network, n., Difference between work charged for and work done ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Sun, Jan 4, 2015 at 7:08 PM, Justin C. Walker jus...@mac.com wrote: To answer another question from earlier in the thread, I believe the database used by Mac OS X during the early years was a hold-over from NeXT days (netinfo?). I think it was essentially gone by the time 10.6 was released. Incorrect; it just changed form. Netinfo is indeed gone, but instead we have DirectoryServices and dscl. -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Sun, Jan 4, 2015 at 7:27 PM, Brandon Allbery allber...@gmail.com wrote: On Sun, Jan 4, 2015 at 7:08 PM, Justin C. Walker jus...@mac.com wrote: To answer another question from earlier in the thread, I believe the database used by Mac OS X during the early years was a hold-over from NeXT days (netinfo?). I think it was essentially gone by the time 10.6 was released. Incorrect; it just changed form. Netinfo is indeed gone, but instead we have DirectoryServices and dscl. ...and indeed: pyanfar:3276 Z$ dscl . read /Computers/localhost dsAttrTypeNative:KerberosFlags: 110 AppleMetaNodeLocation: /Local/Default IPAddress: 127.0.0.1 IPv6Address: ::1 fe80::1%lo0 KerberosServices: host afpserver cifs vnc RecordName: localhost RecordType: dsRecTypeStandard:Computers (It is *not*, however, in /Hosts.) -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Jan 4, 2015, at 16:27 , Brandon Allbery wrote: On Sun, Jan 4, 2015 at 7:08 PM, Justin C. Walker jus...@mac.com wrote: To answer another question from earlier in the thread, I believe the database used by Mac OS X during the early years was a hold-over from NeXT days (netinfo?). I think it was essentially gone by the time 10.6 was released. Incorrect; it just changed form. Netinfo is indeed gone, but instead we have DirectoryServices and dscl. 'it' was netinfo (the nearest antecedent) :-} -- Justin C. Walker, Curmudgeon at Large Institute for the Absorption of Federal Funds --- My wife 'n kids 'n dogs are gone, I can't get Jesus on the phone, But Ol' Milwaukee's Best is my best friend. --- ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Jan 4, 2015, at 16:31 , Brandon Allbery wrote: On Sun, Jan 4, 2015 at 7:27 PM, Brandon Allbery allber...@gmail.com wrote: On Sun, Jan 4, 2015 at 7:08 PM, Justin C. Walker jus...@mac.com wrote: To answer another question from earlier in the thread, I believe the database used by Mac OS X during the early years was a hold-over from NeXT days (netinfo?). I think it was essentially gone by the time 10.6 was released. Incorrect; it just changed form. Netinfo is indeed gone, but instead we have DirectoryServices and dscl. ...and indeed: pyanfar:3276 Z$ dscl . read /Computers/localhost dsAttrTypeNative:KerberosFlags: 110 AppleMetaNodeLocation: /Local/Default IPAddress: 127.0.0.1 IPv6Address: ::1 fe80::1%lo0 KerberosServices: host afpserver cifs vnc RecordName: localhost RecordType: dsRecTypeStandard:Computers (It is *not*, however, in /Hosts.) Do you mean that localhost is not mentioned in /etc/hosts? I can't verify that one way or another since my 10.10 system is an upgrade from several versions back. Justin -- Justin C. Walker, Curmudgeon-At-Large Director Institute for the Enhancement of the Director's Income Weaseling out of things is what separates us from the animals. Well, except the weasel. - Homer J Simpson ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Sun, Jan 4, 2015 at 7:51 PM, Justin C. Walker jus...@mac.com wrote: Do you mean that localhost is not mentioned in /etc/hosts? I can't verify that one way or another since my 10.10 system is an upgrade from several versions back. No, I mean it is not listed in DirectoryServices under the Hosts key. (dscl . ls /Hosts, which is empty because that is normally from DNS, not from a static DirectoryServices table.) -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Sunday January 04 2015 16:51:42 Justin C. Walker wrote: (It is *not*, however, in /Hosts.) Do you mean that localhost is not mentioned in /etc/hosts? I can't verify that one way or another since my 10.10 system is an upgrade from several versions back. My 10.9.5 is an upgrade from 10.6 which in turn was a clean install AFAIK, but I'm pretty sure my /etc/hosts was copied from the disk that survived the death of my 10.4.11 Powerbook G4. # dscl . read /Computers/localhost AppleMetaNodeLocation: /Local/Default IPAddress: 127.0.0.1 IPv6Address: ::1 fe80::1%lo0 KerberosServices: host afpserver cifs vnc RecordName: localhost RecordType: dsRecTypeStandard:Computers Yet: # head /etc/hosts ## # 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 Portia 255.255.255.255 broadcasthost # RJVB 20061015: what?? #::1 localhost6 Justin, exactly what issue do you have with Safari and localhost? I can connect just fine to localhost:631, don't think I have other services running that would make sense to a browser... R. ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Sun, Jan 4, 2015 at 8:14 PM, René J.V. rjvber...@gmail.com wrote: # head /etc/hosts ## # 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 Portia 255.255.255.255 broadcasthost # RJVB 20061015: what?? #::1 localhost6 Note that the above is 10 lines, the cutoff for head. The link-local address is on the line after ::1 in mine (line 10; would be line 11 in yours because of the datestamped comment). -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Sunday January 04 2015 20:18:26 Brandon Allbery wrote: On Sun, Jan 4, 2015 at 8:14 PM, René J.V. rjvber...@gmail.com wrote: # head /etc/hosts ## # 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 Portia 255.255.255.255 broadcasthost # RJVB 20061015: what?? #::1 localhost6 Note that the above is 10 lines, the cutoff for head. The link-local address is on the line after ::1 in mine (line 10; would be line 11 in yours because of the datestamped comment). I count 11 lines, actually - there's an empty line under the #::1 line, and then my own entries start. No link-local address. R. ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Jan 3, 2015, at 3:41 PM, William H. Magill wrote: Did Apple change something in Yosemite/Safari so that localhost is no longer an accessible DNS address for Safari? I have no trouble ssh-ing to localhost on my system, but Safari always responds Can't connect to the Server. Note that at one time I was using Apple's Apache via OSX Server, but have since replaced that with MacPorts. And, I have no idea if localhost worked after I upgraded to Yosemite and OSX Server ceased operation. I experience the problem on Yosemite that localhost will randomly switch between accessing the IPv4 address of my server (which works) and the IPv6 address of my server (which apparently isn't working). I've had to start using 127.0.0.1 instead, which is the IPv4 address. This does not appear to be specific to Safari; I saw it in the terminal with curl too. ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Sat, 3 Jan 2015, Ryan Schmidt wrote: I experience the problem on Yosemite that localhost will randomly switch between accessing the IPv4 address of my server (which works) and the IPv6 address of my server (which apparently isn't working). I've had to start using 127.0.0.1 instead, which is the IPv4 address. This does not appear to be specific to Safari; I saw it in the terminal with curl too. I've seen it in Firefox from time to time, when my MacBook's FF refreshes itself against the pages on my FreeBSD server (which happens to support IPv6 as well, but it shows in the Apache logs). -- Dave Horsfall DTM (VK2KFU) Bliss is a MacBook with a FreeBSD server. http://www.horsfall.org/spam.html (and check the home page whilst you're there) ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Saturday January 03 2015 18:45:15 Ryan Schmidt wrote: I experience the problem on Yosemite that localhost will randomly switch between accessing the IPv4 address of my server (which works) and the IPv6 address of my server (which apparently isn't working). I've had to start using 127.0.0.1 instead, which is the IPv4 address. This does not appear to be specific to Safari; I saw it in the terminal with curl too. I had similar issues a long time ago already, already back in October 2006 I commented out the line with the IPv6 localhost address in /etc/hosts. I've never noticed any side-effects, and using IPv6 when you're behind a router that probably assigns addresses from a private netblock like 192.168.0.0/16 is completely unnecessary. I've never tried, but it might be enough to deactivate IPv6 support in the Network Location settings if you prefer not to touch /etc/hosts. R. ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
On Jan 3, 2015, at 3:41 PM, William H. Magill wrote: Did Apple change something in Yosemite/Safari so that localhost is no longer an accessible DNS address for Safari? I have no trouble ssh-ing to localhost on my system, but Safari always responds Can't connect to the Server. Note that at one time I was using Apple's Apache via OSX Server, but have since replaced that with MacPorts. And, I have no idea if localhost worked after I upgraded to Yosemite and OSX Server ceased operation. Interesting set of replies (below). What triggered my query was the fact that various how to pages describe using localhost as a mechanic for testing certain web based services -- which did not work! https://trac.macports.org/wiki/howto/Apache2 I'm guessing that the over-arching description that one can define ServerName localhost:80 is simply no longer an appropriate statement for OSX and Yosemite. And apparently for Apache2 in general -- it works and passes validation, but the results of its use are not predictable. It also appears that the function of the ServerName directive has changed. The current Apache manual http://httpd.apache.org/docs/2.2/mod/core.html#servername describes its syntax as requiring a FQDN -- which neither Localhost nor IP address constructs (127.0.0,1) really are. (Apparently the directive is directly related to various DOS, Virtual Host and other DNS issues and is supplanted by the results from gethostname C function. http://httpd.apache.org/docs/2.2/dns-caveats.html In short, it appears that the old localhost shortcut needs to disappear from the documentation. For no other reason than the fact that results from using it are not reproducible. I hate documentation which states do X for result Y -- only to get result Z when you do so! All of which is compounded by the fact that while Yosemite will work if you are not connected to the Internet, Apple has structured things such that Yosemite EXPECTS to be connected to the Internet, i.e the iCloud. On Jan 3, 2015, at 7:45 PM, Ryan Schmidt ryandes...@macports.org wrote: I experience the problem on Yosemite that localhost will randomly switch between accessing the IPv4 address of my server (which works) and the IPv6 address of my server (which apparently isn't working). I've had to start using 127.0.0.1 instead, which is the IPv4 address. This does not appear to be specific to Safari; I saw it in the terminal with curl too. On Jan 3, 2015, at 7:49 PM, Richard L. Hamilton rlha...@smart.net wrote: You might try http://127.0.0.1/ and http://[::1]/ (IPv4 and IPv6 addresses for localhost - use https and a port number if required) If neither of those works either, it’s probably not the hostname lookup (which is not necessarily just DNS, depending on how you’re configured). Safari should be able to look up localhost from other than DNS (/etc/hosts or local OpenDirectory storage, I think) anyway.. On Jan 3, 2015, at 7:51 PM, Dave Horsfall d...@horsfall.org wrote: I've seen it in Firefox from time to time, when my MacBook's FF refreshes itself against the pages on my FreeBSD server (which happens to support IPv6 as well, but it shows in the Apache logs). On Jan 3, 2015, at 8:00 PM, René J.V. Bertin rjvber...@gmail.com wrote: I experience the problem on Yosemite that localhost will randomly switch between accessing the IPv4 address of my server (which works) and the IPv6 address of my server (which apparently isn't working). I've had to start using 127.0.0.1 instead, which is the IPv4 address. This does not appear to be specific to Safari; I saw it in the terminal with curl too. I had similar issues a long time ago already, already back in October 2006 I commented out the line with the IPv6 localhost address in /etc/hosts. I've never noticed any side-effects, and using IPv6 when you're behind a router that probably assigns addresses from a private netblock like 192.168.0.0/16 is completely unnecessary. I've never tried, but it might be enough to deactivate IPv6 support in the Network Location settings if you prefer not to touch /etc/hosts. T.T.F.N. William H. Magill mag...@icloud.com mag...@mac.com whmag...@gmail.com ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users
Re: A question about Localhost with Safari
HTTP 1.0 used only the IP address; if you wanted a single server to serve multiple domains, it needed to have multiple IP addresses. HTTP 1.1 permits the use of the hostname, and a single IP that multiple hosts all share. However, in general it should work to leave off the hostname. What you'd get is the the default host's website. I myself use warplife.frylock as the domain for my website when I work on it locally. I have Apache configs for each of my hosts - presently only that one but at times I have more than one. Here I'm counting on the .frylock not being a real TLD, however TLDs have been proliferating lately. MIke Michael David Crawford, Consulting Software Engineer mdcrawf...@gmail.com http://www.warplife.com/mdc/ Available for Software Development in the Portland, Oregon Metropolitan Area. On Sat, Jan 3, 2015 at 11:06 PM, William H. Magill mag...@mac.com wrote: On Jan 3, 2015, at 3:41 PM, William H. Magill wrote: Did Apple change something in Yosemite/Safari so that localhost is no longer an accessible DNS address for Safari? I have no trouble ssh-ing to localhost on my system, but Safari always responds Can't connect to the Server. Note that at one time I was using Apple's Apache via OSX Server, but have since replaced that with MacPorts. And, I have no idea if localhost worked after I upgraded to Yosemite and OSX Server ceased operation. Interesting set of replies (below). What triggered my query was the fact that various how to pages describe using localhost as a mechanic for testing certain web based services -- which did not work! https://trac.macports.org/wiki/howto/Apache2 I'm guessing that the over-arching description that one can define ServerName localhost:80 is simply no longer an appropriate statement for OSX and Yosemite. And apparently for Apache2 in general -- it works and passes validation, but the results of its use are not predictable. It also appears that the function of the ServerName directive has changed. The current Apache manual http://httpd.apache.org/docs/2.2/mod/core.html#servername describes its syntax as requiring a FQDN -- which neither Localhost nor IP address constructs (127.0.0,1) really are. (Apparently the directive is directly related to various DOS, Virtual Host and other DNS issues and is supplanted by the results from gethostname C function. http://httpd.apache.org/docs/2.2/dns-caveats.html In short, it appears that the old localhost shortcut needs to disappear from the documentation. For no other reason than the fact that results from using it are not reproducible. I hate documentation which states do X for result Y -- only to get result Z when you do so! All of which is compounded by the fact that while Yosemite will work if you are not connected to the Internet, Apple has structured things such that Yosemite EXPECTS to be connected to the Internet, i.e the iCloud. On Jan 3, 2015, at 7:45 PM, Ryan Schmidt ryandes...@macports.org wrote: I experience the problem on Yosemite that localhost will randomly switch between accessing the IPv4 address of my server (which works) and the IPv6 address of my server (which apparently isn't working). I've had to start using 127.0.0.1 instead, which is the IPv4 address. This does not appear to be specific to Safari; I saw it in the terminal with curl too. On Jan 3, 2015, at 7:49 PM, Richard L. Hamilton rlha...@smart.net wrote: You might try http://127.0.0.1/ and http://[::1]/ (IPv4 and IPv6 addresses for localhost - use https and a port number if required) If neither of those works either, it's probably not the hostname lookup (which is not necessarily just DNS, depending on how you're configured). Safari should be able to look up localhost from other than DNS (/etc/hosts or local OpenDirectory storage, I think) anyway.. On Jan 3, 2015, at 7:51 PM, Dave Horsfall d...@horsfall.org wrote: I've seen it in Firefox from time to time, when my MacBook's FF refreshes itself against the pages on my FreeBSD server (which happens to support IPv6 as well, but it shows in the Apache logs). On Jan 3, 2015, at 8:00 PM, René J.V. Bertin rjvber...@gmail.com wrote: I experience the problem on Yosemite that localhost will randomly switch between accessing the IPv4 address of my server (which works) and the IPv6 address of my server (which apparently isn't working). I've had to start using 127.0.0.1 instead, which is the IPv4 address. This does not appear to be specific to Safari; I saw it in the terminal with curl too. I had similar issues a long time ago already, already back in October 2006 I commented out the line with the IPv6 localhost address in /etc/hosts. I've never noticed any side-effects, and using IPv6 when you're behind a router that probably assigns addresses from a private netblock like 192.168.0.0/16 is completely unnecessary. I've never tried, but it might be enough to deactivate IPv6
Re: A question about Localhost with Safari
On Jan 4, 2015, at 1:06 AM, William H. Magill wrote: What triggered my query was the fact that various how to pages describe using localhost as a mechanic for testing certain web based services -- which did not work! https://trac.macports.org/wiki/howto/Apache2 I'm guessing that the over-arching description that one can define ServerName localhost:80 is simply no longer an appropriate statement for OSX and Yosemite. And apparently for Apache2 in general -- it works and passes validation, but the results of its use are not predictable. It also appears that the function of the ServerName directive has changed. The current Apache manual http://httpd.apache.org/docs/2.2/mod/core.html#servername describes its syntax as requiring a FQDN -- which neither Localhost nor IP address constructs (127.0.0,1) really are. (Apparently the directive is directly related to various DOS, Virtual Host and other DNS issues and is supplanted by the results from gethostname C function. http://httpd.apache.org/docs/2.2/dns-caveats.html In short, it appears that the old localhost shortcut needs to disappear from the documentation. For no other reason than the fact that results from using it are not reproducible. I don't know why using ServerName localhost wouldn't work. I wouldn't remove it from any documentation. I would guess the Apache documentation says fully-qualified domain name to distinguish from local name only. In other words, if your server is www.example.com, you should put ServerName www.example.com and not ServerName www. I don't know of any reason to declare the port number in the ServerName directive since the port number is already specified in the Listen directive. ___ macports-users mailing list macports-users@lists.macosforge.org https://lists.macosforge.org/mailman/listinfo/macports-users