Folder displaying in terminal but not finder

finderterminalwebserver

Alright, so I just started beginning web development using my mac. My localhost says "It works" and I read somewhere I need to add my code files etc in Library/WebServer/Documents.

However, inside my Library, I do not see any WebServer folder. I can only see WebKit.

But if I try to locate the folder with terminal, it exists right there inside /Library.

What mystery is this? Please help me out.

Best Answer

The default location for WebServer documents is /Library/WebServer/Documents, which is inside the Library folder in the hard disk's root. The WebKit folder you see is at ~/Library/, i.e. the current user's personal Library folder. That folder is hidden by default (if you go to the Home folder, ~, in Finder, by pressing Shift + Cmd + H, you'll either not see the Library folder at all, or it is slightly transparent).

In Finder, press Shift + Cmd + G and enter /Library/WebServer/Documents and you'll be where you need to be.