Apache Web-Serving with Mac OS X: Part 1
Subject:   DirectoryIndex? how to change it
Date:   2002-02-02 16:17:41
From:   twhid
first, just want to say these articles are great and it's really helped me to understand the awesome power under mac's new luscious interface. great job.

my question with some strange observations.

i set a local staging site for my website using your articles and apache on osX. but my hosting service long ago insisted i name my index file as index.htm (they no longer do, but there are hard links that break if i change it to .html).

just to make sure all files are named locally as on my host server, i wanted to change the default DirectoryIndex to index.htm or simply 'index' using this wild card idea on got from apache's online docs.

but it doesn't work. i still get the nasty default directory listing when using http://127.0.01. BUT, when i used http://localhost, it worked, but in an incredibly weird way. there's a fairly fat flash file (40k) on that page and it loaded as if it was coming from a remote server over my dialup!

i was online via dialup at the time, haven't tried it while offline.

any ideas?

Full Threads Newest First

Showing messages 1 through 2 of 2.

  • Morbus Iff photo DirectoryIndex? how to change it
    2002-02-03 13:19:34  Morbus Iff | O'Reilly Author [View]

    I give specific instructions on how to change the DirectoryIndex in the fourth article, available here:

    You should see absolutely no difference between and localhost - if you do, that's insanely supremely weird.

    As for your Flash file, how are your links defined within your HTML file? If they're absolute URLs (like as opposed to relative URLs (like /flash.swf), then yes, it would request the file from the remote server. Generally, if you want your website to be as portable as possible, you should use relative URLs as much as possible.
    • DirectoryIndex? how to change it
      2002-02-04 09:17:21  twhid [View]

      thanks for article four, very helpful.

      re: and localhost. it is VERY strange. i must have something screwed up somewhere in my network settings as i've been having problems networking with my pc running pcmaclan as well.

      it was loading the LOCAL files as if coming from a remote server. it's kind of nice as i can check download times ;-) the files are all linked relatively and these particular files haven't even been uploaded to my remote server yet so that can't be the error. and localhost doesn't seem to resolve unless i'm connected to my dialup.

      but my problem seems to have 'fixed' itself. my browsers (ie and nn6.2) now load index.htm instead of the ugly default index list. i used a wildcard because only a couple of people will be using this staging server.

      thanks for your reply. thanks for this series.