可能拼写错误或由服务器配置中未包含的模块定义

可能拼写错误或由服务器配置中未包含的模块定义

本文介绍了命令“Require"无效,可能拼写错误或由服务器配置中未包含的模块定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在我的开发机器上安装了最新版本的 WAMP,但我无法让它工作.收到这个奇怪的错误.

C:\wamp\bin\apache\Apache2.4.4\bin>httpd.exeAH00526:C:/wamp/bin/apache/Apache2.4.4/conf/httpd.conf 的第 224 行的语法错误:命令Require"无效,可能拼写错误或由服务器配置中未包含的模块定义C:\wamp\bin\apache\Apache2.4.4\bin>httpd.exe -v服务器版本:Apache/2.4.4 (Win64)服务器建成时间:2013 年 2 月 22 日 22:08:37

这是第 224 行的配置:

222:223:允许覆盖无224:要求所有授予225:</目录>

知道我做错了什么吗?

解决方案

Require 指令由 mod_authz_core.如果模块尚未编译到您的 Apache 二进制文件中,您将需要在配置文件中添加一个条目以手动加载它.您可以使用 httpd.exe -l 来检查哪些模块被编译.

如果该模块编译,请使用类似于以下内容的配置行加载它:

LoadModule authz_core_module "/modules/standard/mod_authz_core.so"

当然,您需要为系统调整路径,在 Windows 机器上,库很可能是 dll 而不是 so 文件.>

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?

解决方案

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.

这篇关于命令“Require"无效,可能拼写错误或由服务器配置中未包含的模块定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 18:31