Hero image for: Apache issues after upgrade to Mac OS X Yosemite.

Apache issues after upgrade to Mac OS X Yosemite.

By Eduardo García ● CTO | October 19th, 2014

mac osx yosemite Last night I had the brilliant idea of upgrade to latest version of Mac OS X Yosemite and the upgrade process itself was slow as usual but without any apparent error.

The problems popup when I decide to continue the development of Yeoman Marionette Drupal generator against Drupal 8.

When I try to use my regular installation of Drupal 8, I got the infamous message “It Works!”, so the upgrade screws my apache configuration.

After executing the following command, I detect my system now has Apache 2.4.

$ httpd -v
Server version: Apache/2.4.9 (Unix)
Server built:   Sep  9 2014 14:48:20

Where is my previous configuration

You can find your old configuration at /etc/apache2/httpd.conf~previous, but could be a bad idea restore because some directives could be wrong.

Instead of I start to re-enable the things I used to have enabled.

Mod Rewrite

Because I’m a Drupal developer, this is a mandatory Apache module, to re-enabled you need to edit the file /etc/apache2/httpd.conf and enable the following line

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

Virtual Hosts

If you used to have a virtual host for your different project this feature is gone, again you need to enable the directive to load where are located your virtual host as you can see in the following snippet.

# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf

Client denied by server configuration

After enabling your virtual hosts is probable you can’t access your sites and if you check your error log, you will get an error similar to the following log.

[Sun Oct 19 10:29:31.338082 2014] [authz_core:error] [pid 3008] [client] AH01630: client denied by server configuration: /Users/enzo/www/drupal8/

After reading some document, I found I have to add to my Directory section of Virtual Host the directive Require all granted, after apply my Virtual Host looks like following definition.

<VirtualHost *:80>
    ServerAdmin enzo@enzolutions.com
    DocumentRoot "/Users/enzo/www/drupal8"

    ServerName drupal8

    #ServerAlias www.dummy-host.example.com
    <Directory /Users/enzo/www/drupal8>
        Require all granted
        Options Includes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all

    ErrorLog "/private/var/log/apache2/drupal8-error.log"
    CustomLog "/private/var/log/apache2/drupal8-access.log" common

After this change is probably your PHP version require some tweaks, in this case, I recommend to read the blog entry “Manage PHP versions with Phpbrew.“

I hope you find this article useful.

Related Posts