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.

  • 1
    You're certain you're not confusing /Library with ~/Library ? Also, are you using Go.. from the Finder, which would demand the / in front of Library. btw, Webkit is in ~/Lib, WebServer is in /Lib which would reinforce my first question – Tetsujin Apr 14 '17 at 13:34

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.

| improve this answer | |
  • For more then the last few major releases of OS X/macOS, in one's Home folder in Finder, the Library folder is hidden by default and if the defaults are still in play then you need to press the option key to see the Library folder on the Go menu in Finder. – user3439894 Apr 14 '17 at 14:17

Mac OS has hidden folders within the depths of its hard drive. If you want to make these appear, you have to use the terminal.

Step 1: Open the terminal.

Step 2: Type the command "defaults write com.apple.finder AppleShowAllFiles TRUE", then press Enter (Or Return)

Step 3: Type the command "killall Finder" (make sure you do the capital K) and press Enter/return.

If you ever want to turn this off, Just repeat the commands above, substituting TRUE for FALSE.

| improve this answer | |
  • Did you mean to say "capital F"? – Joseph Hansen Jul 6 at 22:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .