Win7系统64位环境下使用Apache——安装Apache2.4时报错“Invalid command Order”问题的解决
2017-04-28 15:21
561 查看
之前在文章Win7系统64位环境下使用Apache——Apache2.4整合Tomcat与mod_jk提到了安装Apache2.4时有可能报错:
这里单独说一下。
安装Apache2.4的时候,有时候会修改文件:
${Apache2.4}/conf/extra/httpd-vhosts.conf
在里面添加一些内容,比如:
如图:
这里只注意第6部分,里面的:
表示允许全部权限,这在Apache2.2版本中是以:
的方式来授权的。如果在Apache2.4中也标记成了Apache2.2的形式,就会报错:
如图:
所以这里要注意在Apache2.4的安装中,如果要在文件:
${Apache2.4}/conf/extra/httpd-vhosts.conf
中添加授权所有权限的命令,要使用:
而不是:
同意的道理,如果是禁止所有权限要使用:
而不是:
这里参考了:
http://systembash.com/apache-2-4-upgrade-and-the-invalid-command-order-error/
与
http://httpd.apache.org/docs/2.4/upgrading.html
Invalid command ‘Order‘, perhaps misspelled or defined by a module not included in the server configuration
这里单独说一下。
安装Apache2.4的时候,有时候会修改文件:
${Apache2.4}/conf/extra/httpd-vhosts.conf
在里面添加一些内容,比如:
<VirtualHost *:80> ServerName one.test.com JkMount /* one ErrorLog "logs/one-error_log" CustomLog "logs/one-access_log" common </VirtualHost> <VirtualHost *:80> ServerName two.test.com JkMount /* two ErrorLog "logs/two-error_log" CustomLog "logs/two-access_log" common </VirtualHost> <VirtualHost *:80> DocumentRoot "D:\apache-tomcat-6.0.51-file" ServerName file.test.com ErrorLog logs/file-error_log CustomLog logs/file-access_log combined <Directory "D:\apache-tomcat-6.0.51-file"> Require all granted </Directory> </VirtualHost>
如图:
这里只注意第6部分,里面的:
Require all granted
表示允许全部权限,这在Apache2.2版本中是以:
Order allow,deny Allow from all
的方式来授权的。如果在Apache2.4中也标记成了Apache2.2的形式,就会报错:
Invalid command ‘Order‘, perhaps misspelled or defined by a module not included in the server configuration
如图:
所以这里要注意在Apache2.4的安装中,如果要在文件:
${Apache2.4}/conf/extra/httpd-vhosts.conf
中添加授权所有权限的命令,要使用:
Require all granted
而不是:
Order allow,deny Allow from all
同意的道理,如果是禁止所有权限要使用:
Require all denied
而不是:
Order deny,allow Deny from all
这里参考了:
http://systembash.com/apache-2-4-upgrade-and-the-invalid-command-order-error/
与
http://httpd.apache.org/docs/2.4/upgrading.html
相关文章推荐
- Win7系统64位环境下使用Apache——Apache2.2安装及常见问题解决
- Win7系统64位环境下使用Apache——Apache2.4版本安装及卸载
- 启动 apache2.4 出现 invalid command order 问题 【由于 PHP 访问权限 403 问题引起】
- Win7系统64位环境下使用Apache——Apache2.4整合Tomcat与mod_jk
- elgg 安装启动apache2.4后报Invalid command 'order', perhaps misspelled or defined by a module not included
- CentOS6.0(32/64位)安装Apache+PHP+Mysql教程,安装Magento(解决DOM,Mcrypt,GD问题)完整教程
- win7(64位)php5.5-Apache2.4-mysql5.6环境安装
- 关于win7 64位系统安装apache的 教程 httpd2.4服务无法启动 443端口被占用问题
- win7(64位)php5.5-Apache2.4-mysql5.6环境安装
- win7(64位)php5.5-Apache2.4-mysql5.6环境安装
- win7(64位)php5.6-Apache2.4-mysql5.6环境安装
- php 修改了网页访问存储目录,Apache2.4启动时报AH00526错误(Invalid command 'Order')
- win8下使用vagrant安装部署Linux虚拟环境出错的问题解决
- 64位win7系统安装oracle后,使用PL/SQL登录报错解决办法
- apache 使用之三(解决安装后出现的问题 the requested operation has failed)
- win7(64位)php5.5-Apache2.4-mysql5.6环境安装
- CentOS6.0(64位)安装Apache+PHP+Mysql教程,安装Magento(解决DOM,Mcrypt,GD问题)完整教程
- 免安装Oracle客户端使用PL/SQL(Server2008 R2 64位问题也可解决)
- 64位环境下解决apache对中文网址的支持问题
- 安装64位win7后配置php mysql Apache 遇到问题并解决~~