You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How do I set up sites under Mavericks?

I want to set up a local network web server on my iMac to test web page development from various devices on my home network. Howerver, web sharing is no longet listed in the sharing pane. Is there an Apple link that tells me how to do this?

iMac, OS X Mavericks (10.9)

Posted on Dec 9, 2013 6:25 AM

Reply
30 replies

Dec 11, 2013 5:57 PM in response to Chris CA

Chris CA wrote:


Barney-15E wrote:


Your home folder doesn't let any other users view the contents, so it cannot let the www process see the Sites folder.

Isn't that what Web Sharing prefs was supposed to do?

No. The default home folder permissions allows everyone to view the contents so they can get to the Sites and Public folders. If you disable read permission for group and other, then the web server will not be able to get to the user Sites folder. Clicking the checkbox in Sharing didn't change the permissions.

Dec 11, 2013 7:16 PM in response to pbays

This is a quick way to put up a local webserver for personal (local) testing. Like it says, it is simple, and no replacement for full Apache support. For this to work, you must first be in the same directory as your web page.


cd ~/Sites
python -m SimpleHTTPServer >> localhost.log 2>&1 &
#save the PID of this python process
http_pid=$!

Now in your browser, localhost:8000/test.html

In the terminal again,

tail -F localhost.log

When you are done, kill off the python job.
kill $http_pid

Apr 2, 2014 10:47 PM in response to Barney-15E

(I apollogize for butting in.) In awe I followed your discussion. You people know so much! By reading the above I understand why the Sites folder in Mavericks (since Mountain lion) is gone. I had been stuck on 10.6.8 because

of nonsupported audio hardware but was trying to use Mavericks on a second drive in my Mac Pro. I found that

my website would'nd update which let me find that I lost my local home folder in the also disapeared Sites folder.

I posted several quests for a solution in Mavericks use. But no help there. Seing you are posting coded solutions, which I would be scared to do, made me ask you if there might be a solution for a layman like me.

All I need to have a local homefolder of my website I can update my existing website with Dreamweaver the way I have been doing it for years. Please, please can you give me a simple way to do this in Mavericks. (I never opened terminal or did any real coding in Dreamweaver) Thank you so much for you time and patience.

W.W.

Apr 3, 2014 4:45 AM in response to Walter Wedler

Walter Wedler wrote:


(I apollogize for butting in.) In awe I followed your discussion. You people know so much! By reading the above I understand why the Sites folder in Mavericks (since Mountain lion) is gone.

Where did you read that. It's not gone at all.

You're confusing turning on the Apache Web Server with a folder. Just having a folder doesn't server out web pages. Mavericks removed the check box, but the Web server is still installed. You just have to turn it on using the Terminal.


Same goes for FTP.

Apr 3, 2014 6:25 AM in response to Barney-15E

Thank you Barney-15E.

If you search for "Sites folder disappeared" you'll find endless amount of links manny say it's since Mountain Lion like:

Is it just me or is the ~/Sites folder gone in Lion? - Super UserConfiguring personal site folders on

Mountain Lion and Mavericks from the Course Installing Apache, MySQL, and PHP

http://jayfuerstenberg.com/devblog/sites-folder-in-lion-missing

http://www.hawaiiflash.org/adding-sites-folder-to-mountain-lion/


Mine is gone from the go/home folder including my local website folder (plus). Searching for it brings nothing.

No I never changed any folders in my home folder. I also re-installed Mavericks 10.9.2 because I felt the installation was the reason.


Because of compatibility problems with audio-hardware drivers (I use for my bussines) I am stuck on 10.6.8

which has the perfect working Sites folder, my local website folder which I regularly update with my Dreamweaver CS-4. When I upgrade I upgrade a duplicate of what is running perfect on a second build in hard drive. No changes. Thank you for your time and patience,

Walter

Apr 3, 2014 8:01 AM in response to pbays

I am back again with what I think is a permission issue. I cannot get my Sites folder recognized in Mavericks, though it was before I upgraded. I think it was 9.2 that killed it.


Here are my permissions on my Home and Sites directories:


drwx---r-x@ 29 pbays staff 986 Mar 22 19:16 pbays

drwxrwxrwx+ 25 _www 502 850 Apr 3 10:40 Sites


It looks to me like the Home folder (pbays) is not set correctly. However, my choices seem to be Me: R&W, everyone: R only. Should that be R&W? I only seem to have the choices of R or W??

Apr 3, 2014 8:22 AM in response to Walter Wedler

While I am waiting for a non-terminal solution to be able to get back and use the now missing Sites folder in Mavericks, I wanted to share this link (although for Mountain Lion) with those that are comfortable doing terminal:


http://www.hawaiiflash.org/adding-sites-folder-to-mountain-lion/


In my opinion it is the most clear insructions I have seen. Since I do not do terminal I can not tell if this works. If I might say so, at a time that more people run their own web-sites, why would Apple disable a perfect simple way to do this?

Walter

Apr 3, 2014 9:04 AM in response to Walter Wedler

The hawaiiflash.org directions work, sort of. That is, I can use the URL localhost/~username and the page loads. However, that does not make it available to others on the local network.


I previously used the name for the local network (found under the machine name on the sharing panel) and that worked. (name.local/~username) I now get the message that the browser cannnot get to that server. I think it is a permissions issue. I note that the Sites directory owner seems to be _www. When I look at the Sites permission of other user accounts on the machine, there is no _www listed as a user and certainly not the owner. But I cannot seem to delete or change that in my situation. And I cannot delete the Sites directory and start over -- do not have permission to do so.

Apr 12, 2014 6:56 PM in response to Walter Wedler

It is now a week or so later and I have the issue partly solved. With it an observation. I have a bootable cloned backup of this system on an external disk -- running OSX 9.1 and the appropriate version of Safari as of the beginning of January. Booting from that disk, the local web server works fine.


My internal disk is running 9.2 with the latest iteration of Safari. Making sure that I have the permissions set on the internal disk's account and sites directories identical to that on the 9.1 system, Safari still fails to connect to the local server. However, every other browser I have works fine. I can access ther web site from my wife's pc using Firefox, and from my iPad Air using Safari. However, trying to access from my MBP which also runs 9.2, using Safari fails. All other browsers work from the MBP. What's up with Safari??


This is an improvement from my previous posts in which I could not access the site from anywhere or any device. Making some permission changes helped that issue.

How do I set up sites under Mavericks?

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