Forum Moderators: phranque

Message Too Old, No Replies

Apache Custom Auto Index

         

toenailsin

8:17 am on Jun 11, 2006 (gmt 0)

10+ Year Member



Is it possible to customise the look of the apache auto index?

toenailsin

8:35 am on Jun 11, 2006 (gmt 0)

10+ Year Member



ok i found a module (mod_autoindex.so) that has what looks like html in it but its not viewing properly in notepad or wordpad. is there a different program needed to edit these configs?

jdMorgan

3:40 pm on Jun 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You would need to edit the source code rather than the object code. The source is most likely written in the 'C' programming language, and you would modify that code, recompile it, and then link/load it in.

Jim

encyclo

6:43 pm on Jun 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What you can do without altering the source code is to add a custom header and footer to the generated autoindex file, using the
HeaderName
and
ReadmeName
directives in
[url=http://httpd.apache.org/docs/2.0/mod/mod_autoindex.html]mod_autoindex[/url]
. You will also need to use the
IndexIgnore
directive to exclude your header and footer files from displaying in the index.

coopster

6:46 pm on Jun 11, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You can indeed modify some of how Apache 2.0 mod_autoindex [httpd.apache.org] displays the index listing (or
Apache 1.3 mod_autoindex [httpd.apache.org]). Have a read through the manual page for details.

A bit slow today I guess ;) Thanks encyclo

toenailsin

10:30 am on Jun 14, 2006 (gmt 0)

10+ Year Member



ok, so how do i edit 'c'? obviously not with notepad like i'm used to. it just shows up as garble.

is there an editor out there that just has the basics? like notepad? (i hate those fancy programs that try to take all the fun out of programming.)

toenailsin

10:40 am on Jun 14, 2006 (gmt 0)

10+ Year Member



i had a fairly good look at those pages before i came here. i'm not wanting to just do a little tweak to the page or anything. i'm wanting to scrap pretty much everything there and make my own index page (coz i love messing with things :P )

jdMorgan

8:18 pm on Jun 14, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



C is a programming language. The source file will be in plain-text format, the only possible/likely exception being that it may use different line-ender character sequences, such as LF-only, instead of CR-LF like notepad.

But if you're seeing garbled characters, then you're probably trying to edit the object file, not the source. The source should be available in the developers section of the Apache Web site. You'll also need a C compiler/linker/loader to compile the source into a new object file, and get it all linked and loaded with the other Apache object files.

Jim

encyclo

10:11 am on Jun 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Editing the source code and recompiling Apache may well be overkill for something as simple as producing a directory index. You will probably get better and faster results by using a server-side scripting language such as PHP or Perl to generate a listing via the operating system.

Try: [ca3.php.net...]