Apache Error: Invalid command ‘Allow’, perhaps misspelled or defined by a module not included in the
Posted huangtailang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Apache Error: Invalid command ‘Allow’, perhaps misspelled or defined by a module not included in the相关的知识,希望对你有一定的参考价值。
在一个Window Server 2008R2系统上使用Apache架设了一个php的网站项目
在配置Apache的过程中出现了以下问题
根据上面的提示说是没有相应的权限,那就在虚拟主机里进行了配置,httpd-vhosts.conf 中的配置如下
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "D:/test.com" ServerName test.com ServerAlias www.test.com ErrorLog "logs/test.com-error.log" CustomLog "logs/test.com-access_log" common <Directory "D:/test.com"> #也可以在http.conf里统一设置,但因为各个虚拟主机的设置不同,因此建议单独进行设置 AllowOverride All Order allow,deny Allow from all Require all granted </Directory> </VirtualHost>
但配置完成又出现了以下问题
The Apache service named reported the following error:
>>> Invalid command ‘Allow‘, perhaps misspelled or defined by a module not included in the server configuration . 后经过查询才知道相应的模块没有启用,在http.conf中的配置,需要启用以下模块即可
LoadModule access_compat_module modules/mod_access_compat.so #基于主机的组授权(名称或IP地址) httpd 2.x兼容的模块, LoadModule proxy_module modules/mod_proxy.so #apache的代理模块 LoadModule proxy_http_module modules/mod_proxy_http.so #代理http和https请求 LoadModule vhost_alias_module modules/mod_vhost_alias.so #虚拟主机动态配置 LoadModule authz_host_module modules/mod_authz_host.so #基于主机的组授权 Include conf/extra/httpd-vhosts.conf#启用虚拟主机配置
重新启动Apach服务即可
参考:
Apache HTTD 2.4: Invalid command ‘Order’, perhaps misspelled or defined by a module not included in the server configuration
Invalid command ‘Order’, perhaps misspelled or defined by a module not included in the server configuration failed
以上是关于Apache Error: Invalid command ‘Allow’, perhaps misspelled or defined by a module not included in the的主要内容,如果未能解决你的问题,请参考以下文章
Invalid command 'RewriteLog' - apache2.4版本配置方法变了
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com我
mybatis报错 Error instantiating interface com.atguigu.mybatis.dao.DepartmentMapper with invalid types
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.baway.dao.UserM