Apache Deny Allow directive Question

Discussion in 'Apache' started by tonyz, Nov 21, 2006.

  1. #1
    Could you please advise if the following syntax would be the correct way to restrict Apache to only allowing access from machines on IP ranges 192.168.0.2 to 192.168.0.254 with a Subnet mask of 255.255.0.0:

    Order Deny/Allow
    Deny from All
    Allow from 192.168.0.2 192.168.0.254/255.255.0.0

    Presumably I'd need to do this for <Directory />, <Directory "c:/Apache2/htdocs">, <FilesMatch "^.ht">, and <Directory "c:/Apache2/cgi-bin"> in the httpd.conf file.

    Also, are most people still using Apache 1.x or is Apache 2.x (e.g. 2.2.3) becoming popular these days?
     
    tonyz, Nov 21, 2006 IP