Invalid command 'Require', perhaps misspelled or defined by a module not included in the server configuration

拥有回忆 提交于 2019-11-27 23:23:10

问题


I've just installed the latest version of WAMP on my dev machine, and I can't get it to work. Getting this weird error.

C:\wamp\bin\apache\Apache2.4.4\bin>httpd.exe
AH00526: Syntax error on line 224 of C:/wamp/bin/apache/Apache2.4.4/conf/httpd.conf:
Invalid command 'Require', perhaps misspelled or defined by a module not included in the server configuration

C:\wamp\bin\apache\Apache2.4.4\bin>httpd.exe -v
Server version: Apache/2.4.4 (Win64)
Server built:   Feb 22 2013 22:08:37

This is the config at line 224:

222: <Directory />
223:    AllowOverride none
224:    Require all granted
225: </Directory>

Any idea what I'm doing wrong?


回答1:


The Require directive is supplied by mod_authz_core. If the module has not been compiled into your Apache binary, you will need to add an entry to your configuration file to load it manually. You can check which modules are compiled in with httpd.exe -l.

If the module is not compiled in, load it with a configuration line similar to the following:

LoadModule authz_core_module    "<apache install dir>/modules/standard/mod_authz_core.so"

You will need to adjust the path for your system of course, and on a Windows box the library may well be a dll rather than an so file.



来源:https://stackoverflow.com/questions/18844338/invalid-command-require-perhaps-misspelled-or-defined-by-a-module-not-include

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!