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 ...
随机推荐
- div置顶
转载请注明来源:https://www.cnblogs.com/hookjc/ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transit ...
- vi TOhtml:复制保持格式和高亮
1. 文本编辑:在vim中编辑好,复制到opera mail中就会格式错乱,比如:行前空格.缩进消失:2. 代码复制到其他地方,无法显示彩色高亮:找到了一个变通方案:使用TOhtml把vim内容转换为 ...
- 基于Docker部署4.2 版本的zabbix监控平台
准备工作 两台VMware 虚拟机 一台充当zabbix server(安装docker)ip:192.168.73.133 一台充当zabbix agent(安装docker)ip:192.168. ...
- 简介GitHub的使用方法--管理个人代码
转自 http://blog.csdn.net/tengyeyijiu/article/details/46446283git是一个分布式版本控制系统,最初由linus torvalds编写,用作Li ...
- 蟒蛇书学习笔记——Chapter 09 Section 01 创建和使用类
9.1 创建和使用类 9.1.1 创建Dog类 根据Dog类创建的每个实例都将存储名字和年龄,我们赋予了每条小狗蹲下(sit( ))和打滚(roll_over( ))的能力: class Dog: ...
- python篇第10天【While 循环语句】
while 语句时还有另外两个重要的命令 continue,break 来跳过循环,continue 用于跳过该次循环,break 则是用于退出循环,此外"判断条件"还可以是个常值 ...
- 1day漏洞反推技巧实战(3)
代码审计必备技能,github代码对比,写一笔: 搜索某开源组建漏洞,搜索出来某个版本rce: 通过消息得出:存在漏洞版本:1.10.10 ,修复漏洞版本1.10.11 去github寻找apache ...
- 备忘录——关于C#生成条形码
目录 0. 背景说明 1. 使用ZXing.NET 2. 使用BarcodeLib 3. 使用字体 4. 参考 志铭-2022年2月15日 22:15:46 0. 背景说明 在.net程序中生成69码 ...
- 《PHP程序员面试笔试宝典》——如何解决求职中的时间冲突问题?
如何巧妙地回答面试官的问题? 本文摘自<PHP程序员面试笔试宝典> 对求职者而言,求职季就是一个赶场季,一天少则几家.十几家企业入校招聘,多则几十家.上百家企业招兵买马.企业多,选择项自然 ...
- 有个姑娘叫history
文章目录 常用参数 history的一些用法 修改history命令默认保存的数量 来给history穿衣服 让我们重新认识一下history history命令用于显示用户以前执行过的历史命令,并且 ...