这两天在使用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. 我对JavaWeb中中文URL编码的简单总结

    1.application/x-www-form-urlencoded 它是一种编码类型.当URL地址里包含非西欧字符的字符串时,系统会将这些字符转换成application/x-www-form-u ...

  2. HttpClient 的Timeout waiting for connection from pool

    Timeout waiting for connection from pool 异常 httpClient大家用到地方会很多,先简单描述一下几个关键配置的意义 httpClient版本为4.5.1 ...

  3. php 递归目录

    转载请注明来源:https://www.cnblogs.com/hookjc/ $TheFilePath='';function file_list($path){ global $TheFilePa ...

  4. 有手就行4——jenkins项目构建类型(自由风格,maven风格)

    有手就行4--构建Maven项目 Jenkins项目构建类型(1)-Jenkins构建的项目类型介绍 Jenkins项目构建类型(2)-自由风格项目构建 Jenkins项目构建类型(3)-Maven项 ...

  5. ubuntu中codeblocks设置代码黑色主题配色

    说明 网上资料较杂乱,特整理以备留用和他人参阅. 配置文件下载 首先下载配置文件,命名为default.conf. 配置文件 官方配置文件网址 将配置文件替换ubuntu如下路径内的default.c ...

  6. 《PHP程序员面试笔试宝典》——如何进行自我介绍?

    本文摘自<PHP程序员面试笔试宝典> PHP面试技巧分享,PHP面试题,PHP宝典尽在"琉忆编程库". 自我介绍是面试中至关重要的一个步骤,很多面试官对求职者提出的第一 ...

  7. MindSpore多元自动微分

    技术背景 当前主流的深度学习框架,除了能够便捷高效的搭建机器学习的模型之外,其自动并行和自动微分等功能还为其他领域的科学计算带来了模式的变革.本文我们将探索如何用MindSpore去实现一个多维的自动 ...

  8. 「BUAA OO Pre」Git生成多个ssh key并连接GitLab仓库

    「BUAA OO Pre」Git生成多个ssh key并连接GitLab仓库 Part 0 前言 写作背景 笔者在配置学校GitLab的ssh key时遇到一些问题,原因应为曾经配置过GitHub的s ...

  9. Go-grpc 实现

    什么是grpc和protobuf grpc ​ grpc是一个Google开源的高性能.开源和通用的RPC框架,面向移动和HTTP/2设计.目前提供C.Java和Go语言版本, 分别是grpc, gr ...

  10. 深入MySQL(四):MySQL的SQL查询语句性能优化概述

    关于SQL查询语句的优化,有一些一般的优化步骤,本节就介绍一下通用的优化步骤. 一条查询语句是如何执行的 首先,我们如果要明白一条查询语句所运行的过程,这样我们才能针对过程去进行优化. 参考我之前画的 ...