Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.8k views
in Technique[技术] by (71.8m points)

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

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:wampinapacheApache2.4.4in>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:wampinapacheApache2.4.4in>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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...