Apache set up mac os yosemite

3.6k Views Asked by At

I am trying to get Apache to run on my yosemite machine, but when i try to access localhost i get https://i.stack.imgur.com/ZzZzB.png.

I ran an apache configtest and got the following

Angus-Mac:mysql root# apachectl configtest AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using Angus-Mac.local. Set the 'ServerName' directive globally to suppress this message Syntax OK

What am i getting wrong? any ideas?

2

There are 2 best solutions below

0
On BEST ANSWER

Uncommenting the ServerName and changing it to the domain name solved the issue.

7
On

change the group permissions on that folder to _www

sudo chgrp -R _www /Library/WebServer/Documents (all web content is now group _www)
chmod -R go-rwx /Library/WebServer/Documents (nobody other than owner can access web content)
chmod -R g+rx /Library/WebServer/Documents (all web content is now readable/executable/enterable by _www)

then restart apache It seems your user in httpd.conf is different that the one on the web directory

I found the solution here

Please uncomment the ServerName in line 212 (httpd.conf) and change the domain www.example.com to your domain. Restart apache