由于疏忽,我是按照《Mac OS X 10.10 启用 Web 服务器 》一文的步骤进行配置的,没注意看到标题是10.10,结果到http://localhost/~username/ 这一步时总是提示“500 Internal 500 Error",
用sudo vi /private/var/log/apache2/error_log 命令查看发现是这样的错误:
80 [Thu Dec 04 16:02:02 2014] [notice] Apache/2.2.26 (Unix) DAV/2 PHP/5.4.24 mod_ssl/2.2.26 OpenSSL/0.9. 8y configured -- resuming normal operations
81 [Thu Dec 04 16:02:06 2014] [crit] [client 127.0.0.1] configuration error: couldn't perform authentication. AuthType not set!: /~admin/
百思莫得其解,最后才发现是多了一行配置,把"Require all granted"从username.conf中删掉就行了。