Apache on Yosemite Beta

Even though I told myself I wouldn’t, as soon as the beta opened, I was on it.

So far, it seems to be working fine — it’s surprisingly stable, and all my apps seem to be working.

I did, however, have some problems with my local web server setup. And it took a little while for me to figure out just what the hell was happening, so I thought I’d share that with you.

Apache’s configuration files are where they always were: /etc/apache2

Yosemite comes with Apache 2.4.9, as opposed to version 2.2.26 that came with Mavericks. Because of this, it’s got a new httpd.conf file. Your old one will be kept around as httpd-mavericks.conf, but the new apache version has some changes so it might be easier to tweak the new httpd.conf, rather than trying to get your old one working.

The new httpd.conf comments out the default vhosts include — I can’t remember whether it was commented out in Mavericks, too, but all I know is it’s commented out now. That solved one of my problems.

You’ll also notice that a bunch of the module loads are commented out. Specifically, I had to uncomment php5 (on line 169) and rewrite (line 169).

Next was access control.

Apache 2.4 changes access control configuration for directories. Under 2.2, to allow access to a directory one would specify:

Order allow,deny
Allow from all

Now, it’s a one-liner:

Require all granted

I had to go through my vhosts, and update all my `<directory>` directives to use the new method.

You can read more about that over on Apache’s “Upgrading to 2.4” page.

Save all that, restart apache, and everything should work just fine.

About Lewis Dorigo

Here’s some more articles you might like:

  1. Election

    On May 7th, the UK will hold it’s general election. Up until our last general election in 2010, the UK…

    Read More
  2. Only 8.5% of Twitter Accounts are Bots

    In the three months ended June 30, 2014, approximately 11% of all active users solely used third-party applications to…

    Read More
  3. Getting Good at Making Stuff Up

    Just yesterday, I posted a quick thought about a touchscreen Macbook, powered by an A-something processor,…

    Read More