I just installed PHP 7, and suddenly localhost is no longer accessible.

Investigating, apachectl determined that it changed from reading /etc/apache2/httpd.conf, to now be reading /usr/local/etc/httpd/httpd.conf. This means that the local folder that I put in /Library/WebServer/Documents/ are no longer accessible; it's not even listening on port 80 anymore!

What caused it to change, and how do I change it back?

1 Answer 1


What caused it to change, and how do I change it back?

In short, SIP.

The directory /usr/local/ is one of the directories that's not covered by SIP so applications and users are allowed to modify files there. Obviously httpd.conf can be modified so it needs to be located in a non-SIP secured location.

Further, /Library/WebServer/Documents/ is now in a SIP protected directory so it's advisable that you move it from there.

Even though you're using Yosemite, PHP 7 made the change to comply with newer systems. Instead of changing it back, it would be beneficial to make the change in your system now because once you upgrade to El Capitan or higher, it will be required.

  • @Benubird For more information check these answers.
    – JBis
    Jun 28, 2018 at 13:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .