While restarting the MAC computer for a couple of seconds I am able to access the localhost server with IP from the other computer. You should then be able to connect to the VM via its IP address. The mac IP on wifi is 192.168.10.102, the other PC IP is 192.168.10.105Īpache is set to listen on port 80, nf Listen 80 This is my /etc/hosts file: 127.0.0.1 localhost I have disabled the firewall on mac but nothing. Just run the following command in your terminal. If you need to use the ip address of your mac instead of using localhost, here is an easy way to find the ip address of your mac via the command line. I can access the local server using localhost and the IP from the server it self but cannot access from another PC using the IP connected on the same WIFI network with a simple router. How to get the ip address of your localhost on a mac. And when there is no IP address in the directory services configuration, trying to resolve the name then goes to mDNSResponder which asks DNS.I have set the default localhost server to run on my MAC with apache with the default settings. Somehow, the directory services record was out of sync with the /etc/hosts file. 6 Answers 6 Mac->Sys Preferences->Sharing->Enable Web Sharing checkbox Mac->Sys Preferences->Security-> allow your application (e.g. append /Hosts/localhost IPAddress 127.0.0.1 Screenshot of Network window opened showing ip address. Ping: cannot resolve localhost: Unknown hostīash-3.2# dscl. Your IP address will be displayed in field on right (see red box in image below). That's cool, but I still don't understand why the /etc/hosts entry isn't working.Įdit: Solved. Appending a trailing dot is meant to bypass searching for the name "localhost" in other search domains. I've discovered that "ping localhost." works. mac screenshot Type in hostname and it will display. Under your active Wi-Fi connection, you'll find your Mac's local IP address listed as Status: Connected (e.g., 192.168. Must be some setting I've changes somewhere, but I don't know where. Search Terminal and open by double clicking the Terminal icon. Click on the Apple logo in the top-left corner of your Mac's screen. I just set up a new mac laptop and it was working until I migrated from my old one.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |