|
|
#1 |
|
Prospect
Join Date: Apr 2010
Posts: 35
|
Where are default Apache docs served from?
Hi,
I'm using Mac OSX Lion and wondering how to get my default installation of Apache working. I started the web server fine from a terminal using Code:
davea$ sudo apachectl start Code:
<IfDefine !MACOSXSERVER> <IfDefine WEBSHARING_ON> # # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "/Library/WebServer/Documents" |
|
|
|
|
|
#2 |
|
MVP
Join Date: Apr 2008
Location: Berkeley CA USA
Posts: 1,010
|
Your documents need to be readable by Apache. The easiest way to do that is make them world-readable (i.e., "everyone" can read). Apache actually runs the browser as user _www (userid 70). Folders and any cgis also need to be world-executable (or at least executable by _www).
|
|
|
|
|
|
#3 |
|
League Commissioner
Join Date: Sep 2003
Location: Tokyo
Posts: 6,046
|
Unreadable documents produce a 403 Forbidden error, not a 404 Not Found error.
You have not achieved Kolinahr. Your answer lies elsewhere. |
|
|
|
|
|
#4 |
|
Hall of Famer
Join Date: Feb 2003
Location: Brighton, UK
Posts: 3,811
|
System Preferences > Sharing > Turn on Websharing
You can serve up pages by either "creating a personal website folder" in your home folder or from /Library/WebServer/Documents once enabled. Now it is more than likely a permissions issue on files in /Library/WebServer/Documents |
|
|
|
|
|
#5 | ||||||||||||||||||||||||||||||||||||||||||||||
|
League Commissioner
Join Date: Sep 2003
Location: Tokyo
Posts: 6,046
|
More or less the same thing. laredotornado: what else have you done to the default installation? |
||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
#6 |
|
Hall of Famer
Join Date: Feb 2003
Location: Brighton, UK
Posts: 3,811
|
I agree it is the same but it will list the connection address's in the GUI and allow you to create a personal web sharing folder which is worth testing instead of root webserver folder.
from memory you also may need to set your index file to be index.html on OS X unless you add an Apache directive. I personally always have used MAMP for devs as it works better and provides an easy way to setup MySQL, PHP, virtual hosts etc. Last edited by agentx; 02-28-2012 at 05:36 AM. |
|
|
|
|
|
#7 |
|
Triple-A Player
Join Date: Feb 2003
Location: Western New England
Posts: 53
|
Consider reviewing the contents of /private/var/log/apache2/error_log
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|