how to list files and folders like defaut apache2 does ?

Discussion in 'General' started by electronico_nc, Jan 28, 2014.

  1. So, for a specific user I've setup a kind of "FTP-only" account.
    His FTP base dir is :
    /var/www/clients/client2/web4/web/ftp
    The web/ftp has been protected by .htaccess/.htpasswd

    But I get a 403 error while browsing to
    http://his.domain.tld/ftp
    if there is no index.html or index.php in ftp folder.

    Is there a way to display the usual default Apache2 files & dirs listing while browsing this folder ?

    Thanks in advance for your time.

    Nicolas
     
  2. edge

    edge Active Member Moderator

  3. Thanks Edge !

    So, shortcut is :
    Add an Apache directive under Sites then Options in ISPConfig for the wanted folder :
    Code:
    <Directory /var/www/his.domain.tld/web/ftp>
    Options +Indexes
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    and restart Apache2.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes. But the apache restart is not nescessary, ispconfig will do that automatically when the new apache config file is written.

    as alternative, you could have added a .htaccess file in the folder

    /var/www/his.domain.tld/web/ftp/

    with just this line in it:

    Options +Indexes
     

Share This Page