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 9, 2013 7:04 PM in response to Eric Root

Well, I really wanted to run from my Sites directory with a URL. I am not simply doing calendars, etc. I have a whole site with about 150 MB of files and data -- all interconnected. It is not simply a matter of testing a page.


In older versions of OSX, you could set up the Sites directory to serve as a webserver with an appropriate address. I think that must still be possible, but Apple, for some reason, has made it considerably harder. One post I read listed an Apple product to help with the process; but it gets very negative reviews in the ap store.

Dec 9, 2013 7:45 PM in response to pbays

Build your site in Sites and/or in the /Library/WebServer/Documents folder, then run this command in the Terminal

sudo apachectl start

If it doesn't work, run

apachectl configtest

It should tell you what is wrong and where.


And, the directions linked do set up the Web Server for basic http, and https to the Calendar and Contacts server.

Just don't bother with any of the Virtual Hosts configurations and the rest of the stuff dealing with Baikal.

Dec 10, 2013 11:38 AM in response to Barney-15E

OK. I am making some progress but am having a permissions issue. When I do the apache config test, I get the following errror:


httpd: Could not reliably determine the server's fully qualified domain name, using [computer name].local for ServerName


I discovered this after trying to access Sites and getting told I do not have permission to do so.


My computer name is pretty complex, and I could change it. But then I worry about how to handle my long-standing Time Machine backups. Does TM use the machine name or the disk id or both?


Sorry to be such a pest. I did this a number of years ago on a different machine. I fear that my 72 year old brain is fading:-(

Dec 10, 2013 4:43 PM in response to pbays

That message doesn't matter.


The access problem may be related to not having a user.conf file.


Do you get

It works!

when going to http://localhost ?



If so, the server is working but you don't have a user.conf file. It should be in the /etc/apache2/users folder named with the short user name, e.g. pbays.conf. The contents of the file are:

<Directory "/Users/pbays/Sites/">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

Make sure you change the username where I substituted pbays.

Dec 10, 2013 6:43 PM in response to Barney-15E

The file is already there; the only difference from what you offered was that AllowOverride was set to all. That did not work nor does this. Perhaps I am entering the URL wrong for my Sites directory? I am using the following format:


http://[machine name].local/~[my short name]/Sites/index.html


I have, by the way, repaired permissions, but nothing showed up there.

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.