It appears that the ~/Sites directory no longer exists in OS X Lion. I preferred working on sites there than in /Library/WebServer/Documents. Is there any way to change it back, or set it up so that I can work on sites in ~/Sites and have the files automatically moved to /Library/WebServer/Documents?
Asked
Active
Viewed 2.0k times
8
nhinkle
- 37,390
3 Answers
17
If you enable Web Sharing in System Preferences, you now have the option to create a Personal Website Folder which essentially creates a ~/Sites directory.
rds
- 171
3
You can link them together with a Symlink:
cd ~
ln -s /Library/WebServer/Documents Sites
This will make ~/Sites behave as a alias of /Library/WebServer/Documents on the filesystem level, so it should work for all applications that you use.
The ideal way to fix this would be to fix the configuration for the webserver to support ~/Sites for each user again, but if you're the only user using the system, this method described here should work.
Darth Android
- 38,230
-
1Thanks. See my comment above. I just created a "Sites" folder and full functionality was restored. – Oliver Taylor Jul 21 '11 at 22:52
-
2@Oliver That's great! If you post it as an answer, you can accept it (which is allowed (and encouraged!) here if it is indeed the solution). – Darth Android Jul 22 '11 at 13:59
2
Just turning on "Web Sharing" doesn't add the Sites folder. You have to also click the "Create Personal Website Folder" to the right.
Jason
- 21
- 1
~/Sites. I upgraded, did you do a clean install? – William Jackson Jul 21 '11 at 19:23