[Resolved] htaccess - allow access from a certain IP address

Discussion in 'General' started by waltz, Sep 14, 2010.

  1. waltz

    waltz New Member

    I am trying to allow access from a certain IP address using the following lines in htaccess but it is not working. I have "limit" checked under Allow Override options for htaccess.

    <Files *>
    order deny,allow
    deny from all
    allow from MY IP
    </Files>
    Last edited by a moderator: Oct 17, 2010
  2. NiteWave

    NiteWave Administrator

    are both server level and vhost level "limit" of "Allow Override" checked?
  3. waltz

    waltz New Member

    Server is checked. I do not see any vhost. I am using litespeed with directadmin.
  4. NiteWave

    NiteWave Administrator

  5. raymond

    raymond New Member

    ok.........
  6. waltz

    waltz New Member

    AllowOverride is set to All in httpd.conf. What else could be the problem?


    Code:
    DocumentRoot "/var/www/html"
    
    <Directory /home/*>
        AllowOverride All
        Options -MultiViews -Indexes FollowSymlinks IncludesNoExec +Includes
    <Limit GET POST OPTIONS PROPFIND>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS PROPFIND>
        Order deny,allow
        Deny from all
    </LimitExcept>
    </Directory>
    
    <Directory />
        Options All
        AllowOverride All
    </Directory>
    
    <Directory "/var/www/html">
        Options -Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
       <IfModule mod_suphp.c>
            suPHP_Engine On
            suPHP_UserGroup webapps webapps
    	SetEnv PHP_INI_SCAN_DIR
       </IfModule>
    </Directory>
  7. mistwang

    mistwang LiteSpeed Staff

    get rid of <Files *> </Files>
    It is not necessary. see if it works.
  8. waltz

    waltz New Member

    That works, thanks.

Share This Page