mac 中配置apache的DocumentRoot路径 出现403 Forbidden错误
2015-09-25 13:28
651 查看
mac中配置apache
要将默认路径改为自己的路径
DocumentRoot "/Users/username/Documents"
<Directory "/Users/username/Documents">
总是出现 403 forbidden
解决方法如下,
方法1.是否 DocumentRoot 和 Directory 中路径一致
方法2.Directory 中的设置改为
<Directory />
AllowOverride none
Options All
allow from all
</Directory>
方法3.看 /etc/apache2/users/ 下有没有当前的用户 conf 文件
“username”.conf
如果没有,建一个,比如你要改为 /User/abc/work 就要起一个 abc.conf 文件
<Directory "/Users/abc/Sites/">
Options All
AllowOverride none
Order allow,deny
Allow from all
</Directory>
方法4. 以上3个方法都没有搞定,那就是权限的问题了
将abc 用户下的work 设777或755
chmod 777 work
要将默认路径改为自己的路径
DocumentRoot "/Users/username/Documents"
<Directory "/Users/username/Documents">
总是出现 403 forbidden
You don't have permission to access / on this server
解决方法如下,方法1.是否 DocumentRoot 和 Directory 中路径一致
方法2.Directory 中的设置改为
<Directory />
AllowOverride none
Options All
allow from all
</Directory>
方法3.看 /etc/apache2/users/ 下有没有当前的用户 conf 文件
“username”.conf
如果没有,建一个,比如你要改为 /User/abc/work 就要起一个 abc.conf 文件
<Directory "/Users/abc/Sites/">
Options All
AllowOverride none
Order allow,deny
Allow from all
</Directory>
方法4. 以上3个方法都没有搞定,那就是权限的问题了
将abc 用户下的work 设777或755
chmod 777 work
相关文章推荐
- apache 防盗链
- CentOS 7 DHCP+PXE+Apache+Kickstart 自动安装
- CentOS6.5下安装apache2.2和PHP 5.5.28
- windows下php+mysql+apache环境集成 简易版
- hadoop在put数据时,出现org.apache.hadoop.hdfs.server.namenode.NotReplicatedYetException 分析
- apache不记录指定格式元素的日志
- [转载]org.apache.log4j.Logger详解
- apache日志轮询
- 普通用户启动apache服务
- 配置apache的工作模式
- 修改apache的默认用户和组
- apache2 无法重新启动
- 隐藏apache版本信息
- Struts2配置 ClassNotFoundException: rg.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilt
- 解决Apache/PHP无法启动的问题
- Attempting to start Apache service...but apache doesn't work
- hive 报错 java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
- Simple User Access to Apache HBase
- Apache+PHP+Mysql 配置
- org.apache.poi.ss.usermodel 类操作excel数据遗漏