[Mac OS X]10.11 apache 2.4配置笔记

 

  • You don’t have permission to access / on this server.

当出现以上错误信息时,先更改所指向路径的访问权限(如Documents)。

 

  • apache AH01630: client denied by server configuration

2.4的vhosts写法格式不同,需要把

Order deny,allow

Allow from all

Allow from host ip

修改为

Require all granted

Require host ip

整体格式参考如下:

<VirtualHost *:80>
ServerName localhost
DocumentRoot “/Users/sunliang/Documents/SVN-web/web”
DirectoryIndex index.html index.php
ErrorLog “/private/var/log/apache2/sites-error_log”
CustomLog “/private/var/log/apache2/sites-access_log” common
<Directory “/Users/sunliang/Documents/SVN-web/web”>
Options -Indexes +FollowSymlinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

发表评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据