Directory Listing

Discussion in 'General' started by normdouglas, Jan 21, 2007.

  1. normdouglas

    normdouglas New Member

    Hey all, I wish to make one directory on a site able to be listed.

    You know what I mean, so when user type the /directoryname they get a simple list of the contents.

    I have googled for many possible solutions but none of them seem to work. I think I have to do something manual with a .htaccess file which I have done by putting this code into the .htaccess file located within the directory.

    <Directory "/path/to/directory">
    Options +Indexes
    IndexOptions FancyIndexing IconsAreLinks
    </Directory>

    And I have even tried giving full access to the www-data user to the directory.

    Can anyone tell me how to do this please?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please add this:

    To the apache directives of the website in ISPConfig. Make sure that you replace /path/to/directory with the correct full path of the directory.
     
  3. normdouglas

    normdouglas New Member

    I hate it when I can't get things to work...

    Tried that but no cigar.

    Could you tell me, is the path supposed to be the full server path or relative to the site?

    I have full permissions to the www-data account on the particular folder for now just to try and get it working. Is that the correct permissions?

    Cheers
     
  4. normdouglas

    normdouglas New Member

    But wait there's more

    After more testing I can now actually access individual files within the folder by using the full URL in a browser.

    Mind you, this is NOT effected by what I put in the Directives field of the site.

    So... I think the permissions are not the problem, but rather the apache directives stuff.

    Please help.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the exact directives that you added to the apache directives field.
     
  6. normdouglas

    normdouglas New Member

    First I tried...
    Code:
    <Directory "/other">
    Options +Indexes
    IndexOptions FancyIndexing IconsAreLinks
    </Directory>
    Then
    Code:
    <Directory "/web/other">
    Options +Indexes
    IndexOptions FancyIndexing IconsAreLinks
    </Directory>
    And then
    Code:
    <Directory "/var/www/web3/web/other">
    Options +Indexes
    IndexOptions FancyIndexing IconsAreLinks
    </Directory>
    The directory is located within the web folder of the site and is called "other"
     
  7. falko

    falko Super Moderator Howtoforge Staff

    Did you restart Apache?

    Where did you put this?
    Code:
    <Directory "/var/www/web3/web/other">
    Options +Indexes
    IndexOptions FancyIndexing IconsAreLinks
    </Directory>
    If it's in an .htaccess file, you need an
    Code:
    AllowOverride Options
    or
    Code:
    AllowOverride all
    directive.
     

Share This Page