这两天在使用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服务,可完美的访问了。

最新文章

  1. 在Windows上安装Elasticsearch 5.0
  2. Linux系统性能优化思路和方法
  3. 2016/11/16 周三 &lt;Web SQL Database基本使用方法(入门) &gt;
  4. Jmeter默认报告优化
  5. html5全局属性
  6. Linux安全之——Ubuntu的iptable命令使用
  7. 关于ecshop的那些故事
  8. JS正则表达式获取字符串中特定字符
  9. source insight 使用技巧
  10. 【Python3爬虫】用Python中的队列来写爬虫
  11. [物理学与PDEs]第1章习题14 求解 rot 方程
  12. php7 date函数警告去除
  13. emacs初步学习
  14. JDK中关于BIO,NIO,AIO,同步,异步介绍
  15. python的select服务端的代码和客户端的代码
  16. PLSQL函数,存储过程
  17. 20155213 2016-2017-2 《Java程序设计》第六周学习总结
  18. iOS:分组的表格视图UITableView,可以折叠和展开
  19. C语言 &#183; 复数四则运算
  20. NIO编程介绍

热门文章

  1. JS RegExp对象(正则表达式)
  2. UIScrollView的代理方法(delegate)
  3. 测试前期API未实现时,如何写测试方法
  4. docker 网络概述及网络模式详解
  5. 02网络编程( socket套接字+TCP粘包 )
  6. 加密模块hashlib+日志模块logging
  7. Kubernetes:健康检查
  8. Nginx服务器SSL证书安装
  9. Spring源码之@Configuration注解解析
  10. Python中模块调用说明