Reputation: 12915
I'd like to start my apache server in my Mac OSX Mavericks. Here is what I did:
You don't have permission to access / on this server.
Here is my /etc/apache2/httpd.conf: (I didn't change anything here)
DocumentRoot "/Library/WebServer/Documents"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all </Directory>
<Directory "/Library/WebServer/Documents">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Can anybody advise what could be the cause ? Thanks
Upvotes: 16
Views: 50569
Reputation: 6427
Easy way to start apanche server in mavrick
execute this command
sudo apachectl start
sudo apachectl stop
sudo apachectl restart
Upvotes: 15
Reputation: 116
First, point to a file you know is present. By default there is no index.html or similar file (it produces the "It Works!" page from index.html.en
ls /Library/WebServer/Documents
PoweredByMacOSX.gif
PoweredByMacOSXLarge.gif
index.html.en
http://xxx.xxx.xxx.xxx/PoweredByMacOSX.gif
Next, try repairing permissions. If that doesn't work:
sudo chown -R root.wheel /Library/WebServer/Documents
sudo chmod -R a+rX /Library/WebServer/Documents
When in doubt:
sudo tail /var/log/apache2/error_log
Upvotes: 9