ssl 的 wampserver-Apache 2.4.9 配置不起作用

wampserver-Apache 2.4.9 configuration for ssl not working

我按照https://madurad.wordpress.com/2014/04/25/redirect-http-to-https-with-wamp-server/在我的wampserver.When中设置ssl 我测试配置,我得到一个错误:

C:\wamp\bin\apache\apache2.4.9\bin>httpd -t
AH00526: Syntax error on line 213 of C:/wamp/bin/apache/apache2.4.9/conf/extra/h
ttpd-ssl.conf:
Invalid command 'Override', perhaps misspelled or defined by a module not includ
ed in the server configuration

第213行部分是我的配置,这是Directory.... /目录配置。

<Directory "C:/wamp/www/">
   Options Indexes FollowSymLinks MultiViews 
   Override All 
   Order allow,deny 
   allow from all 
   SSLOptions +StdEnvVars
</Directory>

如何修复错误?

没有override参数!

我想你的意思是AllowOverride所以试试

<Directory "C:/wamp/www/">
   Options Indexes FollowSymLinks MultiViews 
   AllowOverride All                             <-- fix1
   Order allow,deny 
   allow from all 
   SSLOptions +StdEnvVars
</Directory>

此外,Apache 2.4 将 Order...Allow ... 的语法更改为 Require ...

所以语法应该是

<Directory "C:/wamp/www/">
   Options Indexes FollowSymLinks MultiViews 
   AllowOverride All                             <-- fix1
   Require all granted                           <-- fix2
   SSLOptions +StdEnvVars
</Directory>