Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NameWidth help requested..

Status
Not open for further replies.

eriol

Programmer
Joined
Jun 25, 2002
Messages
4
Location
US
I am an Apache newbie and couldn't find my answer thru the manual, newsgroup or google, so I'm hoping someone here can help..

I want to be able to change my directory index pages to display the NAME column as full length ( * ) instead of cutting filenames off in the middle..

Example: Say I have an mp3 named "The Beatles - Strawberry Fields Forever.mp3".. When I view the directory, under the 'NAME' column, all I see is "The Beatles - Strawbe..>" and then the line leads into the 'LAST MODIFIED' column missing the "rry Fields Forever.mp3" portion of the file name.. When looking thru the manual, I found this:

NameWidth=[n | *] (Apache 1.3.2 and later) The NameWidth keyword allows you to specify the width of the filename column in bytes. If the keyword value is '*', then the column is automatically sized to the length of the longest filename in the display.

Is NameWidth=* the correct format or is it NameWidth=[*]? I tried both, but neither worked after restarting apache and again, I wasn't sure if I had put the line in the correct area of my httpd.conf..

I added this to my httpd.conf (not sure if I had it in the correct <ifmodule> or not), tried to restart and it gave me an error stating &quot;NameWidth&quot; wasn't recognized.. Am I anywhere close? Is this something I need to alter in the /src/modules/standard/mod_autoindex.c file instead? On a similar note, is it possible to customize directory indexes moreso? Such as adding a bgcolor, a company logo to the left of &quot;<H1>Index of /...</H1>&quot;? I wasn't sure where to begin looking with the last question..

I'm at a loss here and any suggestions/input would be appreciated.. TIA.. Oh, and I am running Apache 1.3.22 on Win98..

Take care..
eriol

 
DocumentRoot "/srv/Options Indexes -FollowSymLinks +ExecCGI +IncludesNoExec +MultiViews
ErrorLog /var/log/apache2/error_log
CustomLog /var/log/apache2/access_log combined

DirectoryIndex index.shtml index.html index.htm index.php
HostnameLookups On
UseCanonicalName On
ServerSignature Email
IndexOptions FancyIndexing Namewidth=30
Put this line in your httpd.conf file under the root web or inside an Alias or VHost.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top