Forbidden You don't have permission to access this resource. 解决办法!

这两天在使用hmailserver+roundcubemail 搭建邮箱时遇到的一些坑和大家分享一下,避免少踩坑。
关用httpd.conf及httpd-vhosts.conf配置我贴出来供大家参考。
我使用的是wamp搭建的。
httpd.conf
ServerName 127.0.0.1:81 #
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
AllowOverride none
Require all denied
</Directory> #
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
HostnameLookups Off #
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:/wamp64/www"
<Directory "C:/wamp64/www">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
需注意几个点:把 "${INSTALL_DIR}/www" 换成 "C:/wamp64/www" 成实际的目录位置。
关键配置:Require all granted
httpd-vhosts.conf
# Virtual Hosts
#
<VirtualHost *:81>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost> #
<VirtualHost *:81>
ServerName xxx.xxxx.xxx
DocumentRoot "c:/wamp64/www/webmail"
<Directory "c:/wamp64/www/webmail/">
require all granted
</Directory>
</VirtualHost>
#
把 "${INSTALL_DIR}/www" 换成 "C:/wamp64/www" 成实际的目录位置。
关键配置:Require all granted
修改完后重启Apache服务,可完美的访问了。

Forbidden You don't have permission to access this resource. 解决办法!的更多相关文章
- Forbidden You don't have permission to access / on this server. You don't have permission to access /phpmyadmin/ on this server. 解决办法
Forbidden You don't have permission to access / on this server. 解决办法 打开 httpd.conf 文件, 将 # onli ...
- WAMP error: Forbidden You don't have permission to access /{you_app_name} on this server
Forbidden You don't have permission to access /{you_app_name}on this server. 需要修改两处: wamp\bin\apache ...
- PHP错误:Forbidden You don't have permission to access / on this server.
今天在测试一个php程序的时候,发现这个问题: Forbidden You don't have permission to access / on this server. 开始的时候我是用http ...
- Forbidden You don't have permission to access / on this server.
原文:Forbidden You don't have permission to access / on this server. Forbidden You don't have permissi ...
- php多站点配置以及Forbidden You don't have permission to access / on this server问题解决
php多站点配置以及Forbidden You don't have permission to access / on this server问题解决 一.总结 一句话总结:我的问题是php的版本问 ...
- wamp网站Forbidden You don't have permission to access
Forbidden You don't have permission to access 问题原因:apache的2.4的版本中 Require all denied 应该变成Require a ...
- Forbidden You don't have permission to access XXX on this server
Forbidden You don't have permission to access / on this server. 找到 apache 配置文件 httpd.conf 把里面的 <D ...
- Forbidden You don't have permission to access /phpStudyTest/application/index/controller/Index.php on this server.
发生情况:将thinkPHP从官网上下了 http://thinkphp.cn 然后安装了phpstudy和PHPstorm,并将thinkPHP解压到www路径下 在用PHPstorm打开 thi ...
- mac上的xampp出现Access forbidden! You don’t have permission to access the requested object. It is either
一个Joomla!程序,之前是在win上的xampp上运行得非常好的,当我把它拿到mac下面的xampp上去运行的时候,发现有问题,没法运行,报以下的错误: Access forbidden! Yo ...
随机推荐
- xcode 常用插件 加快开发速度 --严焕培
1.KSImageNamed-Xcode 为项目中使用的UIImage的imageNamed提供文件名自动补全功能.使用[UIImage imageNamed:@"xxx"]时,该 ...
- 无意进去UIView随笔闹腾着玩 -by 胡 xu
1 @interface UIView : UIResponder<NSCoding, UIAppearance, UIAppearanceContainer, UIDynamicItem> ...
- python——schedule库实现定时任务
今天给脚本加定时任务用到一个schedule库,使用起来很简单方便.https://github.com/dbader/schedulehttps://schedule.readthedocs.io/ ...
- 列出ubuntu软件管理工具apt的一些用法(自由总结)
安装软件包 [root@CentOS7 ~]#apt install tree 删除软件包 [root@CentOS7 ~]# apt remove tree 列出仓库软件包 [root@CentOS ...
- Java中this和super的使用
区别 区别点 this super 访问属性 访问本类中的属性,如果本类没有,则从父类继续查找 访问父类中的属性 调用方法 访问本类中的方法,如果本类没有,则从父类继续查找 直接访问父类的方法 调用构 ...
- Solution -「多校联训」种蘑菇
\(\mathcal{Description}\) Link. 给定一棵含有 \(n\) 个结点的树,设 \(S\) 为其中的非空联通子集,求 \[\sum_{S}(\gcd_{u\in S} ...
- MySQL数据备份/导出 创建用户及其删除
Mysql DCL 创建用户 create user '用户名'@'localhost(本机访问)/%(通配符任何ip地址都可访问本机) 分配权限 grant 权限 on 数据库.表名 to '用户名 ...
- IDEA一键部署SpringBoot项目到服务器
1. 安装Alibaba Cloud Toolkit插件 2. 配置部署环境 2.1 为本次部署设置一个名字 2.2 选择被部署文件的生成方式 IDEA提供了三种方式:Maven Build,Uplo ...
- 使用工具john破解系统密码
下载解压得到一个存在着hash值的passwd的文件,还有一个压缩包解压得到的是一个密码本,应该就是需要使用爆破的密码本了 放在kali里面,根据题目的要求,将root的hash复制下来然后输入到一个 ...
- Django框架表关系外键-多对多外键(增删改查)-正反向的概率-多表查询(子查询与联表查询)
目录 一:表关系外键 1.提前创建表关系 2.目前只剩 书籍表和 书籍作者表没创建信息. 3.增 4.删 5.修改 二:多对多外键增删改查 1.给书籍绑定作者 2.删 3.修改 4.清空 三:正反向的 ...