AllowOverride All
Require all granted
上面这样apache可以启动,写上
Require not ip 192.168.1.10
启动就失败了,我只是想屏蔽一个IP而已嘛,装的是phpstudy lite 2014

解决方案 »

  1.   

    试试 
    Deny from 192.168.1.10
      

  2.   

    <VirtualHost _default_:80>
    DocumentRoot "D:\phpStudy\test"
      <Directory "D:\phpStudy\test">
        Options +Indexes +FollowSymLinks +ExecCGI
        AllowOverride All
        Require all granted
        Require not ip 192.168.1.10
      </Directory>
    </VirtualHost>这样就错了
      

  3.   

     
    记得配合orderOrder Deny,Allow
    Deny from 192.168.1.10
    Allow from all
      

  4.   

    <VirtualHost _default_:80>
    DocumentRoot "D:\phpStudy\test"
      <Directory "D:\phpStudy\test">
        Options +Indexes +FollowSymLinks +ExecCGI
        AllowOverride All
        Require all granted
        Deny from 192.168.1.10
      </Directory>
    </VirtualHost>这样启动是能启动的,就是没有效果,网站照样能打开
      

  5.   

    <VirtualHost _default_:80>
    DocumentRoot "D:\phpStudy\test"
      <Directory "D:\phpStudy\test">
        Options +Indexes +FollowSymLinks +ExecCGI
        Order Allow,Deny
        Allow from all
        Deny from 192.168.1.10
        Deny from 127.0.0.1
        #Require all granted
      </Directory>
    </VirtualHost>我改成这样的,没有用,本机的IP是什么呢
      

  6.   

    Order Allow,Deny    顺序换一下试试   Order Deny,Allow
      

  7.   

        AllowOverride All
        <RequireAll>
          Require all granted
          #Require all denied
          Require not ip 115.171.178.29
          Require not local
        </RequireAll>Require not local 这句在本地倒是能屏蔽掉,在服务器上改成IP后就没有什么用  Require not ip 115.171.178.29