Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Better Directory Listing on Web Server?

  • 23-02-2008 5:19pm
    #1
    Moderators, Motoring & Transport Moderators, Music Moderators Posts: 12,781 Mod ✭✭✭✭


    I often create a directory and put "Options +Indexes" in the .htaccess so all files are visible. The only thing that bugs me is how crap the interface is. It only shows the first ~20 characters of the filename and it just generally looks ugly.

    Is this just standard or is there a way to make it better?


Comments

  • Registered Users, Registered Users 2 Posts: 2,919 ✭✭✭Bob the Builder


    It's standard I think, there's not really much of a way of improving it, or so experience tells me! There are applications available that you just put the index.php file into the directory and that presents the files to the user in a very nice, neat, customizable fashion. I'll have a look for the file I used and I'll post again later...

    ~Nev


  • Moderators, Motoring & Transport Moderators, Music Moderators Posts: 12,781 Mod ✭✭✭✭Zascar


    That sounds perfect, thanks!


  • Registered Users, Registered Users 2 Posts: 2,919 ✭✭✭Bob the Builder


    Here it is!
    Demo: http://evoluted.net/stuff/

    Application Homepage.
    http://www.evoluted.net/community/code/directorylisting.php

    I always found it really handy. Hope it helps.
    At least it's better than the gammy white background apache server running on port 80 file view thing, and doesn't require htaccess, is easy to template.

    Regards,
    Nev


  • Registered Users, Registered Users 2 Posts: 3,889 ✭✭✭cgarvey


    There are a few tweaks you can make to the default apache httpd directory listings. Check out the IndexOptions directive in the manual.


  • Registered Users, Registered Users 2 Posts: 568 ✭✭✭phil


    As cgarvey said, if it's just the width name you want to configure, you can use the Apache directive
    IndexOptions NameWidth=50
    

    There are other IndexOptions parameters that control other variables. See here for more info http://httpd.apache.org/docs/2.0/mod/mod_autoindex.html#indexoptions

    The other alternative is to use a pre-packaged autoindex script ala http://autoindex.sourceforge.net/

    You can customise your own autoindex script by simply setting the last file in your DirectoryIndex to /dirindex.php or something similar. If you need this to be across multiple vhosts, then you can use the following directives outside any VirtualHost directives.
    Alias /dirindex /path/on/server/to/dirindex
    DirectoryIndex index.html otherindexpages.html /dirindex/dirindex.php
    

    Phil.


  • Advertisement
Advertisement