关于Windows:使用Apache默认值,未为服务” Apache”安装ConfigArgs

No installed ConfigArgs for the service “Apache”, using Apache defaults

我已在32位Windows 7服务器上安装了Apache 2.4。

当我重新启动apache服务时,在Windows事件查看器中会生成以下事件

1
2
3
[pid 2864:tid 400] (OS 2)The
system cannot find the file specified.  : AH00435: No installed ConfigArgs for
the service"Apache", using Apache defaults.

如何解决此错误?


Apache正在寻找注册表项

1
HKLM\\SYSTEM\\ControlSet001\\Services\\<service_name>\\Parameters\\ConfigArgs

类型为REG_MULTI_SZ,可以为空。在您的" Parameters"服务下手动创建新键,然后使用新的"多字符串变量"为空。

或者如果您需要Wix来执行此操作:

1
2
3
4
5
6
7
  <Component Id="CMP_RegistryEntries" Guid="{guid}" Directory="logs" KeyPath="yes">
    <RegistryKey Root="HKLM" Key="SYSTEM\\ControlSet001\\Services\\$(var.Apache_SVC_Name)\\Parameters" ForceCreateOnInstall="yes">
      <RegistryValue Name="ConfigArgs" Action="write" Type="multiString">
        <MultiStringValue Name="ConfigArgs" Action="write" Type="multiString"></MultiStringValue>
      </RegistryValue>
    </RegistryKey>
  </Component>