.htaccess directory access with username/password

  • Hello all


    I created a htaccess over i-MSCP with permission for a group, to access the folder.


    This is the original .htaccess:

    Code
    1. ### START i-MSCP PROTECTION ###AuthType BasicAuthName "Beliebiger Text"AuthUserFile /var/www/virtual/domain.tld/.htpasswdAuthGroupFile HASH(0xsome-hash)->'{HOME_PATH'}/.htgroupRequire group Joomla### END i-MSCP PROTECTION ###


    But this ended with an HTTP error 500


    I changed manually to:

    Code
    1. ### START i-MSCP PROTECTION ###
    2. AuthType Basic
    3. AuthName "Beliebiger Text"
    4. AuthUserFile /var/www/virtual/domain.tld/.htpasswd
    5. AuthGroupFile /var/www/virtual/domain.tld/.htgroup
    6. Require group Joomla
    7. ### END i-MSCP PROTECTION ###


    And it just works :blush:


    I could not find, where I have to fix this:huh:


    i-MSCP Version: Current Master (Git) :angel:




    Thanks for fixing



  • Hello ;


    Git master from (date or hash please)?


    What distro are you using?
    What i-MSCP httpd server are you using?
    What are the permissions set on the .htaccess, htgroup and htpasswd files?


    Thanks you

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Sorry, forgot to send this data:


    What distro are you using?

    Code
    1. root@merkur:~# uname -aLinux merkur 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64 GNU/Linuxroot@merkur:~# cat /etc/debian_version 7.1root@merkur:/usr/local/src/imscp# git rev-parse HEADb8df734487e8edad9b4f5e417cbff931c6d00d46


    What i-MSCP httpd server are you using?
    Apache2


    What are the permissions set on the .htaccess, htgroup and htpasswd files?

    Code
    1. ls -al .htgroup .htpasswd htdocs/administrator/.htaccess
    2. -rw-r----- 1 vu2012 vu2012 246 Aug 24 16:40 htdocs/administrator/.htaccess
    3. -rw-r----- 1 root www-data 52 Aug 24 16:38 .htgroup
    4. -rw-r----- 1 root www-data 271 Aug 24 16:38 .htpasswd


    Thanks :blush:

  • re;


    i-MSCP httpd server implementation:


    - Fcgi (Fcgid or FastCGI
    - ITK
    - PHP-FPM


    ???


    Anyway I see something wrong in the generated vhost:


    Code
    1. AuthGroupFile HASH(0xsome-hash)->'{HOME_PATH'}/.htgroup


    I'll check and fix.


    Thanks you for your report.


    Edit Bug confirmed:


    Code
    1. ### START i-MSCP PROTECTION ###
    2. AuthType Basic
    3. AuthName "War zone"
    4. AuthUserFile /var/www/virtual/domain.com/.htpasswd
    5. AuthGroupFile HASH(0x1d601e8)->'{HOME_PATH'}/.htgroup
    6. Require group testing
    7. ### END i-MSCP PROTECTION ###

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

    Edited once, last by Nuxwin ().

  • Re;


    Should be fixed in last master. See https://github.com/i-MSCP/imsc…05523fe157d6edca1270e4283


    Thank you for using i-MSCP

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206