Cannot restart Apache?

I just installed Apache from homebrew (brew install httpd).

When i try to restart it with the command :

 sudo apachectl --restart

I get this message :

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using daniel.local. Set the 'ServerName' directive globally to suppress this message
httpd (pid 40659) already running

Only way i can really restart Apache is by restarting the machine...

Any ideas ?

Thanks

13

1 Answer

For the Brew version of Apache (httpd) it is installed in the /usr/local tree. You can find the httpd.conf file at /usr/local/etc/httpd/httpd.conf

In the httpd.conf there is a directive called ServerName and the default config is:

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName 

Uncomment the ServerName and specify a fully qualified hostname.

Other host names can be defined in VirtualHosts as needed.

If you are not using ports in the protected range you do not need to use sudo.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like