0

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?

Angus
  • 45
  • 1
  • 6
  • Can you post your httpd.conf and /etc/hosts file? – liorsolomon Dec 04 '14 at 19:30
  • http://pastebin.com/vpCi1ugs - httpd.conf http://pastebin.com/k2ZUuqx1 - hosts – Angus Dec 04 '14 at 19:33
  • Also please paste the permission you have on the directory? ls -l /Library/WebServer/Documents. and also paste the error_log. Thanks! – liorsolomon Dec 04 '14 at 19:50
  • http://i.imgur.com/Ek3lYuL.png how do i get the error log? – Angus Dec 04 '14 at 19:55
  • Possible duplicate of [Could not reliably determine the server's fully qualified domain name for MacBook](https://stackoverflow.com/questions/43559201/could-not-reliably-determine-the-servers-fully-qualified-domain-name-for-macboo) – kenorb Dec 04 '17 at 14:59

2 Answers2

1

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

Community
  • 1
  • 1
liorsolomon
  • 1,785
  • 14
  • 24
1

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

kenorb
  • 155,785
  • 88
  • 678
  • 743
liorsolomon
  • 1,785
  • 14
  • 24