Apache Error: Invalid command ‘Allow’, perhaps misspelled or defined by a module not included in the server configuration

在一个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服务即可

参考:

解决问题 “You don‘t have permission to access /index.html on this server.”

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配置httpd-vhosts虚拟主机总结及注意事项

解决方案:虚拟主机是设置在httpd-vhosts.conf还是vhosts.conf还是httpd.conf?

Apache下的配置文件httpd.conf、httpd-vhosts.conf(windows)

Apache Module mod_authz_host

From WizNote

时间: 2024-10-02 04:14:20

Apache Error: Invalid command ‘Allow’, perhaps misspelled or defined by a module not included in the server configuration的相关文章

Invalid command &#39;WSGIScriptAlias&#39;, perhaps misspelled or defined by a module not included in the ser

没有Include wsgi,运行: sudo a2enmod wsgi 可能出现下面的错误 ERROR: Module mod-wsgi does not exist! 安装 libapache2-mod-wsgi sudo apt-get install libapache2-mod-wsgi sudo a2enmod wsgi 版权声明:本文为博主原创文章,未经博主允许不得转载. Invalid command 'WSGIScriptAlias', perhaps misspelled o

Invalid command &amp;#39;WSGIScriptAlias&amp;#39;, perhaps misspelled or defined by a module not included in the ser

没有Include wsgi,执行: sudo a2enmod wsgi 可能出现以下的错误 ERROR: Module mod-wsgi does not exist! 安装 libapache2-mod-wsgi sudo apt-get install libapache2-mod-wsgi sudo a2enmod wsgi Invalid command 'WSGIScriptAlias', perhaps misspelled or defined by a module not i

python安装locustio报错error: invalid command &#39;bdist_wheel&#39;的解决方法

locust--scalable user load testing tool writen in Python(是用python写的.规模化.可扩展的测试性能的工具) 安装locustio需要的环境条件是:Python2.6+,但是不支持Python3. 今天在cmd里运行pip install locustio,报错提示:error: invalid command 'bdist_wheel'. 原因:pip和setuptools的版本较低. 解决方案:升级pip和setuptools. 一

Android源码编译:出现zip error: Invalid command arguments解决办法

前段时间出版本编译的时候,偶然间发现了这个问题: zip error: Invalid command arguments (cannot repeat names in zip file) make: *** [out/target/product/k200_hdmiin/system/etc/recovery-resource.dat] Error 16 make: *** Waiting for unfinished jobs.... 背景介绍 博主目前从事AndroidTVBox开发,基

Debain update apache error AH00111: Config variable ${APACHE_RUN_DIR} is not defined

今天升级kali 导致apache 无法启动,问题如下: [email protected]:~# apache2 -k start [Sat Jan 21 21:01:16.273933 2017] [core:warn] [pid 3248] AH00111: Config variable ${APACHE_RUN_DIR} is not defined apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: Defau

apache下/.htaccess: Invalid command &#39;RewriteEngine&#39;错误信息如何解决。

错误信息. [Wed Nov 05 23:57:10 2014] [alert] [client 127.0.0.1] .../wamp/www/.../.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration. RewriteEngine命令需要rewrite mod的支持,$>cd /etc/apa

Apache2.4启动时报AH00526错误(Invalid command &#39;Order&#39;)

在WIN XP下手动配置PHP环境,安装Apache2.4+fastcgi后,重启Apache服务,出现如下提示: AH00526: Syntax error on line 293 of D:/php_web/Apache24/conf/httpd.conf: Invalid command 'Order', perhaps misspelled or defined by a module not includedin the server configuration 搜索一下,大多是说mo

PHP 500 -Invalid command RewriteEngine的解决

转自:http://blog.csdn.net/wang02011/article/details/8205903 环境:   wampserver-2.1a 系统 :  win8 错误 :  500 -Invalid command RewriteEngine 日志 : [Tue Nov 20 22:52:24 2012] [alert] [client 127.0.0.1] D:/wamp/www/.htaccess: Invalid command 'RewriteEngine', per

rpm build error: invalid predicate

rpm build error error message:/usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/RPMS find: invalid predicate `' error: Bad exit status from /var/tmp/rpm-tmp.86590 (%install) The error appears to be caused by an empty RPM_BUILD_ROOT variable. Below