Skip to content

Instantly share code, notes, and snippets.

@giorgiofellipe
Forked from symmetriq/apache_yosemite.md
Last active August 29, 2015 14:08
Show Gist options
  • Save giorgiofellipe/4521448e7285986bf8e3 to your computer and use it in GitHub Desktop.
Save giorgiofellipe/4521448e7285986bf8e3 to your computer and use it in GitHub Desktop.

In OS X 10.10 (Yosemite), Apache has been upgraded from 2.2 to 2.4, which includes some significant changes, and the default config file has changed quite a bit. When you install Yosemite, it renames your old config to httpd.conf~previous, and unfortunately your old one won't work anymore.

To get Apache working again, edit the following files:

/etc/apache2/httpd.conf

Uncomment:

LoadModule userdir_module libexec/apache2/mod_userdir.so
LoadModule php5_module libexec/apache2/libphp5.so
Include /private/etc/apache2/extra/httpd-userdir.conf
/etc/apache2/extra/httpd-userdir.conf

Uncomment:

Include /private/etc/apache2/users/*.conf
/etc/apache2/users/[username].conf

Replace every occurrence of these lines:

Order allow,deny
Allow from all

...with this:

Require all granted

If you have multiple users (or any other config file that contains those lines), you'll need to do this for each one.

I believe the latter change is due to an auth-related module that's now disabled by default. You could probably just re-enable the old one, but unless you have a specific reason for using it, it makes more sense to just get with the new program than have to enable the old auth module on every machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment