这两天在使用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. 解决办法!的更多相关文章

  1. 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 ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. 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的版本问 ...

  6. 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 ...

  7. 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 ...

  8. 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 ...

  9. 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 ...

随机推荐

  1. UITabBarController的基本使用

  2. js添加元素代码

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  3. PHP中的一些常用函数收集

    <?php //===============================时间日期=============================== //y返回年最后两位,Y年四位数,m月份数字 ...

  4. 利用纯代码写出一个秒表表盘的方法 —— #DF

    @interface ViewController () @property (nonatomic, strong) CALayer *secLayer; // 秒针layer @property ( ...

  5. Tomcat服务部署及优化

    Tomcat 服务部署及优化 1.Tomcat简介 2.Tomcat 服务安装及部署 3.Tomcat虚拟主机配置 4.Tomcat 优化 1.Tomcat简介: 概述: Tomcat是Java语言开 ...

  6. shell脚本命令(sotr/unip/tr/cut/eval)与正则表达式

    shell脚本命令(sotr/unip/tr/cut/eval)与正则表达式 1.sort命令 概述: Linux sort命令用于将文本文件内容加以排序. sort命令可针对文本文件的内容,以行为单 ...

  7. Linux专项之Apache

    day01:apache服务框架 前期准备 1.虚拟机上网 实验一:展示默认页面 1.安装软件(httpd) yum search httpd yum install -y httpd 2.关闭防火墙 ...

  8. INTERSPEECH 2014 | 1-Bit Stochastic Gradient Descent and its Application to Data-Parallel Distributed Training of Speech DNNs

    这篇文章之前也读过,不过读的不太仔细,论文中的一些细节并没有注意到.最近为了写开题报告,又把这篇论文细读了一遍.据笔者了解,这篇论文应该是梯度量化领域的开山之作,首次使用了梯度量化技术来降低分布式神经 ...

  9. ASP.NET Core 6框架揭秘实例演示[06]:依赖注入框架设计细节

    由于依赖注入具有举足轻重的作用,所以<ASP.NET Core 6框架揭秘>的绝大部分章节都会涉及这一主题.本书第3章对.NET原生的依赖注入框架的设计和实现进行了系统的介绍,其中设计一些 ...

  10. Centos7.+系统,二进制包脚本安装Mysql

    #!/bin/bash #配置数据库要安装的目录,可以根据自己的安装路径修改PATHDIRPATHDIR="/project"BASEDIR="$PATHDIR/mysq ...