Author Topic: Apache autoindexer  (Read 1461 times)

TheQuirk

  • VIP
  • Member
  • ***
  • Posts: 2,154
  • Kudos: 315
Apache autoindexer
« on: 28 December 2002, 21:49 »
I was starting to think about downloading some script that'll show the contents of a folder and link to the files (or writing, if there were no available). I then realized that this was dumb because apache had "autoindexer" builtin - my question is, how would I utilize it? I know Void has done it...

Kintaro

  • Member
  • **
  • Posts: 6,545
  • Kudos: 255
  • I want to get the band back together!
    • JohnTate.org
Apache autoindexer
« Reply #1 on: 28 December 2002, 18:42 »
i was going to ask this to, as a lan party is coming up and i want to share things.

beltorak0

  • Member
  • **
  • Posts: 223
  • Kudos: 0
    • http://www.angelfire.com/realm/beltorak
Apache autoindexer
« Reply #2 on: 29 December 2002, 04:31 »
<Directory "<<whatever>>">
  Options Indexes << or FancyIndexes >>
  Order allow,deny
  Allow from all
</Directory>

Check your httpd.conf; also see Apache Online Docs

-t.
from Attrition.Org
 
quote:
Like many times before, Microsoft is re-inventing the wheel and opting for something other than round.

-t.


Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
Apache autoindexer
« Reply #3 on: 29 December 2002, 05:05 »
or if you want it in all directories than put Options Indexes in the root container.
The default apache usually has this enabled i believe, and i also think that default is that indexes act as fancy indexes anyway.
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

TheQuirk

  • VIP
  • Member
  • ***
  • Posts: 2,154
  • Kudos: 315
Apache autoindexer
« Reply #4 on: 29 December 2002, 12:59 »
NO NO, I'm looking for the directive called "headers" or something like that...

Master of Reality

  • VIP
  • Member
  • ***
  • Posts: 4,249
  • Kudos: 177
    • http://www.bobhub.tk
Apache autoindexer
« Reply #5 on: 29 December 2002, 22:51 »
huh?
Disorder | Rating
Paranoid: Moderate
Schizoid: Moderate
Linux User #283518
'It takes more than a self-inflicted gunshot wound to the head to stop Bob'

beltorak0

  • Member
  • **
  • Posts: 223
  • Kudos: 0
    • http://www.angelfire.com/realm/beltorak
Apache autoindexer
« Reply #6 on: 30 December 2002, 23:38 »
You mean the header that is displayed whenever you view a directory?  It's a file, notmally HEADER that is in the directory.

from that apache link I gave you:
Apache Docs (1.3)
 
quote:

HeaderName  directive
Syntax: HeaderName filename
Context: server config, virtual host, directory, .htaccess
Override: Indexes
Status: Base
Module: mod_autoindex
Compatibility: some features only available after 1.3.6; see text

The HeaderName directive sets the name of the file that will be inserted at the top of the index listing. Filename is the name of the file to include.

    Apache 1.3.6 and earlier: The module first attempts to include filename.html as an HTML document, otherwise it will try to include filename as plain text. Filename is treated as a filesystem path relative to the directory being indexed. In no case is SSI processing done. Example:

        HeaderName HEADER

    when indexing the directory /web, the server will first look for the HTML file /web/HEADER.html and include it if found, otherwise it will include the plain text file /web/HEADER, if it exists.




read som other stuff there (like IndexIgnore, ReadmeName, etc etc).

-t.
from Attrition.Org
 
quote:
Like many times before, Microsoft is re-inventing the wheel and opting for something other than round.

-t.


Kintaro

  • Member
  • **
  • Posts: 6,545
  • Kudos: 255
  • I want to get the band back together!
    • JohnTate.org
Apache autoindexer
« Reply #7 on: 4 January 2003, 16:55 »
cool

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Apache autoindexer
« Reply #8 on: 4 January 2003, 19:50 »
I use "HEADER.html" and "README.html" to modify the beginning and end of the HTML generated by mod_autoindex. If you want an example see http://voidmain.kicks-ass.net/files/HEADER.html and http://voidmain.kicks-ass.net/files/README.html so when you view http://voidmain.kicks-ass.net/files/ it shows up the way I want it.

You can also manipulate the columns using key words in your httpd.conf:

IndexOptions FancyIndexing HTMLTable SuppressHTMLPreamble VersionSort NameWidth=* DescriptionWidth=* SuppressLastModified

You might want to look at the documentation for mod_autoindex at www.apache.org.

I also slightly changed the source code for mod_autoindex. It was spitting out HTML that I believe was wrong so I fixed it to pass HTML 4.01.

[ January 04, 2003: Message edited by: void main ]

Someone please remove this account. Thanks...

Kintaro

  • Member
  • **
  • Posts: 6,545
  • Kudos: 255
  • I want to get the band back together!
    • JohnTate.org
Apache autoindexer
« Reply #9 on: 9 January 2003, 19:27 »
Thanks VoidMain.

You have a PM that i sent a while ago btw.

Kintaro

  • Member
  • **
  • Posts: 6,545
  • Kudos: 255
  • I want to get the band back together!
    • JohnTate.org
Apache autoindexer
« Reply #10 on: 9 January 2003, 21:03 »
My system complained about FancyIndexes, said it was illegal, and that the penguin police where going to arrest me.

Well actually it said it was invalid, and im using the default apache with Red-Hat.

However i did add the directive from webmin, because im a lazy slag.

Im also going to lan party in 2 days, does anyone know some good firewall software for Linux that isnt IP Chains?

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Apache autoindexer
« Reply #11 on: 9 January 2003, 23:50 »
quote:
Originally posted by l33t h4x0r dud3:
My system complained about FancyIndexes, said it was illegal, and that the penguin police where going to arrest me.

Well actually it said it was invalid, and im using the default apache with Red-Hat.

However i did add the directive from webmin, because im a lazy slag.



Maybe because the directive is "FancyIndexing" and not "FancyIndexes". I copy/pasted it right from my Apache config on my Red Hat box. I never use Webmin for Apache configuration. Actually about the only thing I use it for is MySQL/PostgreSQL database/user creation and setting database permissions but I don't always use it for that either.

 
quote:

Im also going to lan party in 2 days, does anyone know some good firewall software for Linux that isnt IP Chains?



iptables
Someone please remove this account. Thanks...

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Apache autoindexer
« Reply #12 on: 9 January 2003, 23:55 »
quote:
Originally posted by l33t h4x0r dud3:
You have a PM that i sent a while ago btw.


Uh, not me. Are you sure you didn't send it to someone else?
Someone please remove this account. Thanks...