Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Enthusiast Zone > Networking > localhost points to website

localhost points to website
Thread Tools
Fresh-Faced Recruit
Join Date: May 2007
Status: Offline
Reply With Quote
May 7, 2007, 11:39 PM
 
I have a macbook pro running osx. I do not know whether this happens if i am in windows since i don't currently have it installed, but when I access http://localhost or http://myip from my computer or any other on the network, i get a website loading instead of my apache, even if i turn apache off. what would cause this? some dns glitch? the website it directs to is not just a straight ip though, because the address would look like www.website.com/folder/folder/something.php and it is not a redirect, since localhost stays in the address bar.

any ideas?
     
Posting Junkie
Join Date: Nov 2000
Location: in front of my Mac
Status: Offline
Reply With Quote
May 8, 2007, 03:17 AM
 
I'm guessing it's serving the the content of /Library/WebServer/Documents as the default for http://localhost.

Are you sure it still serves that page (do a forced reload to make sure you're not just looking at a cached or proxy served page) when you stop Apache? And how did you stop Apache? Try this: go to System Preferences > Sharing and make sure "Personal Web Sharing" is unchecked. Have you enabled the root account in the past BTW?
     
Administrator
Join Date: Apr 2001
Location: San Antonio TX USA
Status: Offline
Reply With Quote
May 8, 2007, 07:03 AM
 
Apache is set up in OS X by default to provide something-not much, mind you, but something. The "Seeing this instead of the website you expected?" page is just the default "successful installation" page for Apache. But when I go to http://localhost, I don't get redirected. I think if you do get redirected that you should look at your hosts file (but I can't remember where that is at the moment...). The hosts file can redirect ANYTHING.
Glenn -----
OTR/L, MOT, Tx
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:44 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2