Unable to find my directory on localhost apache server

I am running on macbook air Apache 2.4.16 version with php and mysql and am unable to locate my directory :-

When I type in http://localhost/ in the url - the message on the webpage says “It Works !”


When I type under the url


The following page is displayed :-

Not Found
The requested URL /username/ was not found on this server.

What do I need to do in order to see my directory ?

Kind Regards

That’s telling you that there is no folder called ‘username’ under the root directory.

Http://localhost/ is an alias for a folder in your Mac’s directory structure. On Linux, that path would be /var/www/html , which is where you’d find the file that says “It works!”. On the Mac, the path ‘may’ be slightly different, but you should be able to locate it there somewhere.

You have to create it first, inside your document root.
Not sure about Mac, but on Linux it is /var/www/html by default

See what directory; have you uploaded one?

On a PC you have a directory something like htdocs and inside that there will probably be an index.html file which should have “It Works” in the file. It could be formatted with html code.

The folder/directory with index.html in is the one you put your website into.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.