Jan Fan     About     Archive     Feed     中文博客

Apache Version and Setting Changed in OS X Yosemite

Today I just upgraded my Mac to 10.10 Yosemite. Before I could even be able to enjoy the new UI style in Yosemite, I found that my personal wiki server was not working any more! My god, get down to work...

My wiki KMS is based on dokuwiki, which depends on Apache and PHP. It seems the new operating system overrides the current setting of Apache, to be exact, changing it from Apache/2.2.24 into Apache/2.4.9.

What problems can this lead to? When you visit your local or remote server as usual, it responds with the following error:

 |404 Not Found                             |
 |                                          |
 | The requested URL localhost/~USERNAME/XXX|
 | was not found on this server.            |
 |403 Forbidden                          |
 |                                       |
 | You don't have permission to access   |
 | localhost/~USERNAME/XXX on this server|


Basically, the default Web Root Directory in OS X is: /Library/WebServer/Documents/, which requires no configuration.

Additionally, users can have their own Web Root Directories: ~/Sites

To achieve this, you need to do a couple things first:

For Apache 2.4 and in all *.conf files (e.g. httpd-vhosts.conf, http.conf, httpd-autoindex.conf ..etc) use

Require all granted

instead of

Order allow,deny

Allow from all

New things are not always in easy use :(


comments powered by Disqus