Operating System - HP-UX
1831043 Members
2377 Online
110019 Solutions
New Discussion

Re: module configuration in HP-UX Apache

 
SOLVED
Go to solution
Jason Moorhead_2
Frequent Advisor

module configuration in HP-UX Apache

I need to make a change to the configuration of module mod_autoindex on my hp-ux 11.11 apache webserver. I know the change I need to make, but how in the world do you go about editing an apache module? I can't seem to find an easy answer for this anywhere.

Thanks,
Jason
10 REPLIES 10
Mark Greene_1
Honored Contributor

Re: module configuration in HP-UX Apache

The mod* files are binaries, so you'd need access to the source C code for the particular module you want to modify. You can get the official apache version here:

http://httpd.apache.org/docs-2.1/mod/mod_autoindex.html

mark
the future will be a lot like now, only later
Jason Moorhead_2
Frequent Advisor

Re: module configuration in HP-UX Apache

Where is the c code at? I don't see it on the server itself, and I don't see a mention of how to get it on the page you sent me.

Thanks again

Mark Greene_1
Honored Contributor

Re: module configuration in HP-UX Apache

Here's one version, but I don't know how compatible it is with your build:

http://apache.hpi.uni-potsdam.de/document/sources/httpd-2.0.45-html/__modules_generators_mod_autoindex_c.html

What you may have to do is get the complete source code for the build you are using and then extract the module from that. Where'd you get what you are running from?

mark
the future will be a lot like now, only later
Jason Moorhead_2
Frequent Advisor

Re: module configuration in HP-UX Apache

Unfortunatly for this scenario, I got it from the HP Web Services depot on software.hp.com.

Honestly, I don't even know what version of Apache this is running. The swlist doesn't show the apache version.
Mark Greene_1
Honored Contributor

Re: module configuration in HP-UX Apache

Look in /opt/apache/logs/error.log, it should give you the version with the last start-up message. There may also be release documentation in /opt/apache/htdocs/doc/apache.release.notes

Once you've ID'd the version, getting the correct module will be much easier, and then the apache.org folks should be able to point you in the right direction.

mark
the future will be a lot like now, only later
Jason Moorhead_2
Frequent Advisor

Re: module configuration in HP-UX Apache

Thanks Mark, we're running 2.0.48
Mark Greene_1
Honored Contributor

Re: module configuration in HP-UX Apache

ok, I'm brain-dead today or something. I just realized what you are wanting to do. The autoindex settup is in the httpd.conf file, which ought to be in /opt/apache/conf. It's about half way down the file. Look for " "

mark
the future will be a lot like now, only later
Jason Moorhead_2
Frequent Advisor

Re: module configuration in HP-UX Apache

Well, in httpd.conf, the only reference to autoindex is:
"LoadModule autoindex_module modules/mod_autoindex.so"

Sorry to be such a pain here. :)
Mark Greene_1
Honored Contributor
Solution

Re: module configuration in HP-UX Apache

I tried sending this as an attachement, but it wouldn't upload. This is from my version 1.3.26 conf file:

#
# Directives controlling the display of server-generated directory listings.
#


#
# FancyIndexing is whether you want fancy directory indexing or standard
#
IndexOptions FancyIndexing

#
# AddIcon* directives tell the server which icon to show for different
# files or filename extensions. These are only displayed for
# FancyIndexed directories.
#
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

#
# DefaultIcon is which icon to show for files which do not have an icon
# explicitly set.
#
DefaultIcon /icons/unknown.gif

#
# AddDescription allows you to place a short description after a file in
# server-generated indexes. These are only displayed for FancyIndexed
# directories.
# Format: AddDescription "description" filename
#
#AddDescription "GZIP compressed document" .gz
#AddDescription "tar archive" .tar
#AddDescription "GZIP compressed tar archive" .tgz

#
# ReadmeName is the name of the README file the server will look for by
# default, and append to directory listings.
#
# HeaderName is the name of a file which should be prepended to
# directory indexes.
#
# If MultiViews are amongst the Options in effect, the server will
# first look for name.html and include it if found. If name.html
# doesn't exist, the server will then look for name.txt and include
# it as plaintext if found.
#
ReadmeName README
HeaderName HEADER

#
# IndexIgnore is a set of filenames which directory indexing should ignore
# and not include in the listing. Shell-style wildcarding is permitted.
#
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t


# End of indexing directives.
the future will be a lot like now, only later
Jason Moorhead_2
Frequent Advisor

Re: module configuration in HP-UX Apache

That was it! I found the line called IndexOptions and made it look like:

"IndexOptions FancyIndexing VersionSort NameWidth=* SuppressDescription"

I added the NameWidth option so we could see the full filename of the directory listing and then added the Suppress option to get rid of the description field (which is rarely used and clears up like 20 chars of room).

Thanks again, Mark!!!