Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Apache - directory listing configuration

Posted on 2000-03-20
5
Medium Priority
?
614 Views
Last Modified: 2013-12-15
Is there any way to configure how the directory listing looks?
I have a link on my intranet site that links to a directory, so users can view all the documents in it. but when the directory listing is brought up, the column for the name is not wide enough and cuts off half the documents titles. Also the text is in times new roman, but all my site is written in ariel. I just wondered if the directory listings page is configurable, if so how?
Thanks.
0
Comment
Question by:neilrodgers75
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 2636997
Yeah, take a look at the Apache directive IndexOptions. You can set the column widths and lots of other stuff. You can't, as far as I know, change what font the client browser is going to use unless you want to use DirectoryIndex to feed a pre-built directory listing (in html) to the client.
0
 

Author Comment

by:neilrodgers75
ID: 2639580
Sorry, could you dumb it down a little. Which file contains this info? I have found that I need to increase the line-

NameWidth=[n | *]

But I don't know which file it is in.
Thanks.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2639967
Apache is controlled by it's configuration file(s) (httpd.conf, srm.conf, access.conf) The location of this files is installation specific, so I can't necessarily tell you where they are. You can look at the init script that starts the server at bootup (probably /etc/rc.d.init.d/http) and it ought to tell you where the config dir is (quite possibly /etc/http/conf).

If you don't have it handy, the Apache docs are on-line at http://www.apache.org/docs/. You'll need to look at them for the syntax of the directives.
0
 
LVL 4

Accepted Solution

by:
kiffney earned 400 total points
ID: 2645940
You would edit httpd.conf (usually in /etc/httpd/conf, but do 'locate httpd.conf' if you don't find it there.
If you have Apache 1.3.2 or later, for the directory you want to index, you would have entries like this

<Directory /home/junkIwantlisted>
IndexOptions NameWidth=*
</Directory>

will give you a listing that is not truncated.  If you have icons in your listing, you can set the IconWidth to a certain number of pixels to give your names more room.  (Change

IndexOptions NameWidth=*

to

IndexOptions NameWidth=* IconWidth=20

and experiment.
Or you can put a number instead of a * and it will list that number of characters.  You may have to restart apache before this takes effect.

To change the font, you'd add a
Headername HEADER
inside the <directory></directory> section.  This will stick the contents of a file called HEADER.html from the directory you are listing.  You can put your font commands there.
0
 

Author Comment

by:neilrodgers75
ID: 2649056
Thats exactly what I wanted to know, I just tried it and got it working the way I want, Thanks.
0

Featured Post

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question