Open tvongaza opened 12 years ago
I've ran into this as well.
Ditto. Seems to be a Safari issue.
I'm seeing this issue as well, and I also tried downloading and using Webkit instead and it exhibits the same behavior. Chrome/Firefox work fine. Not cool.
FYI, I've filed this issue with Apple, http://openradar.appspot.com/radar?id=1277407
Also occurs with the application HTTP Client, which presumably uses the same mechanism as Safari to do the lookup.
I've had a look at how pow performs lookups of .dev addresses and it appears to register a custom resolver with OS X in /etc/resolvers
. The source-code references the resolver man page.
A typical install produces /etc/resolver/dev
:
# Lovingly generated by Pow
nameserver 127.0.0.1
port 20560
A portion of the pow installer is a name server written in JavaScript which handles these requests. The process that handles these requests is auto-started via .plist
file registered with launchctl
.
I just pushed a fix to the master branch that fixes the problem for me. ppane now writes your application's hosts to /etc/hosts. It only does this on Lion. Please let me know if this fixes it for you.
Thanks!
Works great for me.
Thanks for this fix. I am still having trouble reaching .local hosts. Here is what I did: git pulled the latest master to my local passenger pane repository. Confirmed that the latest git log entries showed the Lion fix. Ran the build command and got a new, working passengerpane in the build folder. Uninstalled my existing one. Quit System Settings. Installed my new one by double clicking. Restarted (multiple times in the end). Tried to reach the local directory through Safari -- still no go. Deleted and recreated the site -- no go. No changes evident in my etc/hosts file. Curious! Would love to have this back and appreciate you taking your time on something that Safari seems to have broken from the pack to mess up. Cheers and thank you for spending time on this really useful tool -- your generosity saves us all a ton of time setting up development instances and it is appreciated! Charles
Charles, can you open /etc/hosts on your system and check if the sites you've configured ended up in there?
Thanks so much for the reply. Sadly, no, my hosts file has remained unchanged through several rounds of delete a site in the pref pane, add it again, etc. Here is the current text and every thing on the bottom is added by hand to get the sites working:
#
127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost
127.0.0.1 yaddo.dev 127.0.0.1 mesolore.dev
I looked closely at the source code before compiling and saw where you look for Lion (10.7) and write the hosts. But no joy for me. I have gotten the latest on the git repository and rebuilt a couiple of times, always removing the previous one and checking that I have a new binary, but the lion behavior is still not triggered. I am wondering if somehow my build process is off? Or some permissions issue is holding me back:
-rw-r--r-- 1 root wheel 501 Sep 2 07:16 /etc/hosts
Thanks so much for your help! C
Charles Forcey 12 Thompson Lane Durham, NH 03824 p. 603-868-9900 c. 603-781-1189 f: 800-403-0463 www.historicusinc.com cforcey@historicusinc.com
On Sep 9, 2011, at 4:36 PM, Manfred Stienstra wrote:
Charles, can you open /etc/hosts on your system and check if the sites you've configured ended up in there?
Reply to this email directly or view it on GitHub: https://github.com/Fingertips/passengerpane/issues/68#issuecomment-2055491
Does ~/Library/PreferencePanes/Passenger.prefPane/Contents/Resources/lib/passenger_pane/directory_services.rb or /Library/PreferencePanes/Passenger.prefPane/Contents/Resources/lib/passenger_pane/directory_services.rb include workaround code? If not you, please remove the passenger pane and reinstall.
The workaround copies the entries from the directory services into you hosts file, so also make sure your hosts are listed when running:
$ /usr/bin/dscl localhost -list /Local/Default/Hosts
If they're not listed there I'm not sure what's wrong (:
Here are the contents of that directory_services.rb
module PassengerPane
class DirectoryServices
def self.registered_hosts
`/usr/bin/dscl localhost -list /Local/Default/Hosts`.split("\n")
end
def self.register(hosts)
hosts.each do |host|
system(trust("/usr/bin/dscl localhost -create /Local/Default/Hosts/#{host} IPAddress 127.0.0.1"))
end
end
def self.unregister(hosts)
hosts.each do |host|
system(trust("/usr/bin/dscl localhost -delete /Local/Default/Hosts/#{host}"))
end
end
end
end
Looks like I have to delete and reinstall it! Will trouble shoot some more -- thanks! Checking the git checkout I have, the right code is in the lib directory (checking for 10.7) but not in the package that I created from the code. So I will try to familiarize myself with the build process and figure out why the new library is not being tucked in there. That part is new for me! Thanks again for taking your time to help!
PS: Hosts all show up fine when I do: /usr/bin/dscl localhost -list /Local/Default/Hosts
SOLUTION! I needed to delete the contents of my release directory for xcodebuild to overwrite the binary with the new package. Once I did that, I could confirm the new code was in the new package and I was good to go. On my first edit, /etc/hosts was modified to include all my preference pane hosts. Thanks so much! Knowing where to look in the package for the updated code was the key to debugging my installation.
1) Built ppane from master with xcode 2) Setup a server with "ppain" called "app_name.local" with an alias of "app_name" 3) Can browse to "http://app_name.local" and "http://app_name" just fine with Chrome and Firefox 4) Can browse to "http://app_name" on Safari 5.1 5) Cannot browse to "http://app_name.local" on Safari 5.1