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 ...
随机推荐
- nginx开发: 模块nginx_tcp_proxy_module
nginx支持ws\wss连接,接入nginx_tcp_proxy_module模块 nginx版本1.14.2,在nginx_tcp_proxy_module模块中的上下行数据接口中处理数据解包与打 ...
- php解决抢购秒杀抽奖等大流量并发入库导致的库存负数的问题
我们知道数据库处理sql是一条条处理的,假设购买商品的流程是这样的: sql1:查询商品库存 1 if(库存数量 > 0) 2 { 3 //生成订单 4 //库存-1 5 > 当没有并发时 ...
- Swift 学习网址精选 By HL
虽然目前iOS大部分的项目开发语言用的不是Swift,但随着Swift的不断强大,取代Objective-C 指日可待,所以学习Swift是十分必要的.但毕竟是亲儿子,目前只有Foundation被翻 ...
- MySQL索引类型一览 让MySQL高效运行起来(转)
转自:http://www.php100.com/html/webkaifa/database/Mysql/2010/0409/4279.html 索引是快速搜索的关键.MySQL索引的建立对于MyS ...
- HTTPStatus(状态码返回)详情
1xx(临时响应) 表示临时响应并需要请求者继续执行操作的状态代码. 代码 说明 100 (继续) 请求者应当继续提出请求. 服务器返回此代码表示已收到请求的第一部分,正在等待其余部分. 101 (切 ...
- Centos7系统使用yum遇到的问题failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
简单粗暴重新安装yum. 1.查看linux上所有的yum包 # rpm -qa|grep yum 2.逐个卸载,如 # rpm -e yum-plugin-fastestmirror-1.1.31- ...
- vue 定义全局函数和变量
背景 最近我在整一个网站,介绍一些有意思的网站和实用工具的网站并且把他们收集起来,网站刚建有些不成熟希望给点意见 我用的是前端框架的vue, 但是我没有打包,直接甩到服务器上了, 不想扯了, 步骤 1 ...
- 《PHP程序员面试笔试宝典》——在被企业拒绝后是否可以再申请?
如何巧妙地回答面试官的问题? 本文摘自<PHP程序员面试笔试宝典> 很多企业为了能够在一年一度的招聘季节中,提前将优秀的程序员锁定到自己的麾下,往往会先下手为强.他们通常采取的措施有两种: ...
- JDK动态代理为什么必须要基于接口?
原创:微信公众号 码农参上,欢迎分享,转载请保留出处. 前几天的时候,交流群里的小伙伴抛出了一个问题,为什么JDK的动态代理一定要基于接口实现呢? 好的安排,其实要想弄懂这个问题还是需要一些关于代理和 ...
- 【Java分享客栈】我为什么极力推荐XXL-JOB作为中小厂的分布式任务调度平台
前言 大家好,我是福隆苑居士,今天给大家聊聊XXL-JOB的使用. XXL-JOB是本人呆过的三家公司都使用到的分布式任务调度平台,前两家都是服务于传统行业(某大型移动基地和某大型电网),现在 ...