.htaccess depth to recurse

Discussion in 'Install/Configuration' started by alexvicol, Feb 2, 2014.

  1. alexvicol

    alexvicol Member

    I've been using the following "tweak" with a .htaccess at the location: /home/.htaccess what had:

    order allow,deny
    allow from all

    deny from XX.XX.XX.XX

    This tweak helped me stop unwanted visitors for all my cPanel accounts ( I had ".htaccess depth to recurse" set to 5 ) and not create a .htaccess rule in every cPanel account.

    After a litespeed update ( 4.2.6 I think ) it doesn't work anymore.
    How can I solve this?

  2. NiteWave

    NiteWave Administrator

    I think the possible change in 4.2.6 is to improve the compatibility with apache.
    does your trick work on apache 2 ?
    this info is important to lsws.
  3. alexvicol

    alexvicol Member

    Just switched to apache for one minute and it works.
  4. mistwang

    mistwang LiteSpeed Staff

    Which version of LiteSpeed is used before 4.2.6 update.
  5. alexvicol

    alexvicol Member

    4.2.4 , I think.
    I'm not sure what version I had when I installed this trick, but It's not older than 4.2.4
  6. NiteWave

    NiteWave Administrator

    lsws web admin -> Actions -> Version Manager
    can see all installed versions and switch between them without downtime since it's graceful restart.

    you can switch to different version to determine which version has broken the trick.
  7. alexvicol

    alexvicol Member

    It looks like on litespeed it doesn't work.
    I've switched through all versions of lsws installed.
    But I remember it worked on 4.2.4 when I've configured this .htaccess.

    Anyway, on apache it looks like it works.
  8. mistwang

    mistwang LiteSpeed Staff

    LSWS does not check .htaccess beyond the user's root directory, for performance reason.

    However, we will add a feature in 5.0 release to check .htaccess beyond user's root directory during initial configuration, it means that if you make change to /home/.htaccess, it require a restart, we do not expect it to happen frequently.

    In the mean time, you can add the ACL rules with <Directory /home> ... </Directory> in httpd.conf . Or, just add that to <Directory /> context.

Share This Page