zoukankan      html  css  js  c++  java
  • apacheh2.4和php5.5集成环境遇到的问题

    装了wampserver64位,里面的php是5.5,apache是2.4

    1.配置虚拟主机时碰到问题:apache AH01630: client denied by server configuration

    解决方案如下:

    apache2.2的写法:

    <VirtualHost *:80>
     ServerName fdipzone.demo.com
     DocumentRoot "/home/fdipzone/sites/www"
     DirectoryIndex index.html index.php
    
     <Directory "/home/fdipzone/sites/www">
      Options -Indexes +FollowSymlinks
      AllowOverride All
      Order deny,allow
      Allow from all
     </Directory>
    
    </VirtualHost>

    如果在2.4中使用以上写法就会有apache AH01630: client denied by server configuration错误。

    Order deny,allow
    Allow from all
    Allow from host ip

    修改为

    Require all granted
    Require host ip

    修改后的配置如下:

    <VirtualHost *:80>
     ServerName fdipzone.demo.com
     DocumentRoot "/home/fdipzone/sites/www"
     DirectoryIndex index.html index.php
    
     <Directory "/home/fdipzone/sites/www">
      Options -Indexes +FollowSymlinks
      AllowOverride All
      Require all granted
     </Directory>
    
    </VirtualHost>

    2.路由伪静态的问题:500错误

    .htaccess: Invalid command 'AddOutputFilterByType', perhaps misspelled or defined by a module not included in the server configuration

    .htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration

    除了打开rewrite模块以外,还要开启mod_filter.so和mod_headers.so模块才行

    解决方法,apache2.4中

  • 相关阅读:
    Java流程控制,用户交互scanner和运算结构
    Day14_Date类
    Day14_BigDecimal的使用
    Day14_StringBuffer和StringBuilder
    Day14_String概述
    装箱、拆箱面试题
    Day14_类型转换与装箱、拆箱
    简单的银行小案例
    Day12_面向对象 异常处理机制
    Day12_面向对象 异常机制
  • 原文地址:https://www.cnblogs.com/xingmeng/p/5016101.html
Copyright © 2011-2022 走看看