Where is localhost/index.html in the file system?

I have been trying to learn php and some months ago created a file that makes "It works!" come up when I type "localhost" in the browser. Now I can't locate where in the file system the file is. I am not sure it is in the same spot that Apple set as the default. I recently installed MAMP, which expects localhost to default to /Applications/MAMP/htdocs. It doesn't. Bottom line is I want to know how to find the "index" file that the browser looks for when I type "localhost" and how to change where the browser looks for it if I have to. The browser I use is Firefox 15.0.1.

iMac, Mac OS X (10.6.8)

Posted on Sep 15, 2012 5:13 PM

Reply
2 replies

Sep 17, 2012 12:25 PM in response to BDAqua

I found on my own that when "localhost" is typed in the browser, then the html file that is displayed is:

[name of hard drive partition]/Library/WebServer/Documents/index.html.en

My problem is that I can't use the local web server to do anything. I installed MAMP (Mac Apache MySQL and PHP), which was supposed to change where localhost looks for filed to /Applications/MAMP/htdocs. It didn't, and even with UNIX text editor I can't edit or add files to the Directory where "localhost" is now. If MAMP has support, I haven't found it. I might get support if I purchased MAMP Pro, but if the free version doesn't work, I don't have reason to trust the enhanced Pro version.

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.

Where is localhost/index.html in the file system?

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