why is localhost at 192.168.1.3

When I setup websharing, localhost points to http://192.168.1.3/ instead of 127.0.0.1.


If this is correct then why do I recieve a Forbidden error when I attempt to access pages in my users/sites/ folder?


I do get the "It Works" message when connecting to http://192.168.1.3/


Mike

Mac Pro, Mac OS X (10.6.2)

Posted on May 2, 2012 8:32 PM

Reply
Question marked as Top-ranking reply

Posted on May 3, 2012 5:26 AM

I think you're confused. http://127.0.0.1 or http://localhost sends your http request through the loopback interface. http://192.168.1.3 sends your http request through either the ethernet (en0) or the Airport (en1) interface. If you are trying to request a page from a user's Sites folder either http://localhost/~<user_name> on the host computer running Apache or through your lan with http://192.168.1.3/~<user_name>. Change <user_name> with the appropriate User Name.

6 replies
Question marked as Top-ranking reply

May 3, 2012 5:26 AM in response to Michael Roberts12

I think you're confused. http://127.0.0.1 or http://localhost sends your http request through the loopback interface. http://192.168.1.3 sends your http request through either the ethernet (en0) or the Airport (en1) interface. If you are trying to request a page from a user's Sites folder either http://localhost/~<user_name> on the host computer running Apache or through your lan with http://192.168.1.3/~<user_name>. Change <user_name> with the appropriate User Name.

May 3, 2012 9:29 AM in response to Mark Jalbert

Mark


I may not be explaining the problem accurately. I am confused only in that I am expecting one result, localhost being at 127.0.0.1 and am getting a different result. It is like adding 1 and 1 expecting 2 and getting 5.

I know that localhost is the loopback.

With websharing enabled, I should be able to go to a browser, key in either http://127.0.0.1/~michaelroberts or http://localhost/~michaelroberts or even localhost/~michaelroberts and connect to the "site" or "pages" located in the michaelroberts folder.

When I go to the system preferences, select sharing, and click on Web Sharing, I find "your personal website, in the Sites folder, in your home folder, is available at this address:

http://192.168.1.3/~michaelroberts. Your computer's website is availble at http://192.168.1.3.

Where does this vagrant IP address come from? Why doesn't is show as 127.0.0.1?

Michael

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

why is localhost at 192.168.1.3

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.