Forum OpenACS Q&A: Server shows directory listings, does not load directory index

Got OpenACS up and running on WinNT/PostgreSQL 7.1.1/AOLServer 3.2.
There is a bit of a strange behavior that I am experieincing, though:
whenever I go to http://www.mydomain.com:/ I am getting directory
listing, i.e. index.tcl does not get loaded.  What gives?  I am using
default nsd.tcl (the one from this site).

TNX

Hmmm. I don't know. On your logs, are the tcl files parsed upon AOLserver startup?

Would you like to write something describing how you got everything up and running on NT? I am sure many would benefit from this information.

Rob,

I will (already started).  I also noticed that for whatever reason I get doubled slashes in my URLs, maybe this is the same problem all over?  i.e. when I click on index.tcl on ${pageroot}/admin/ directory, I get http://www.mydomain.com/admin//index.tcl

This would not be muuch of an issue, but it messes up a few other things like images (when they are refered to as ../pics/something).

In my experiments, the AOLServer core tcl files were not parsed until I changed the directory name for c:aolserver cl to tcl8.3 (or some similar change, don't remember exactly). After that I no longer got directory listings and tcl file dumps, but OpenACS.
I think the double slashes are a legacy bug within AOLserver, I've found them in a bunch of places where url fragments are stitched together.

Is the index.tcl file present in the directory listing?  Is the index.tcl file listed in the nsd.tcl?
  ns_section ns/server/yourservername
  ns_param directoryfile index.tcl

Are tcl pages enabled?

Do tell us about your WinNT/PostgreSQL/AOLserver journey.  I loaded up the cygwin toolset yesterday and was surprised/pleased to see that it comes with PostgreSQL 7.1.

(Hmm, that would be an interesting OpenACS campaign: get the cygwin toolkit to include AOLserver and OpenACS.)

Ok, in a nutshel, without much proof reading, here's what I have done: https://openacs.org/wp/display/43/

As for the original question in this thread: changing d:program filesaolserver cl into tcl8.3 did sort of help: directory does not get listed, but index.tcl still does not load.

So, I've attempted a "salami" technique: since I know that stock nsd.tcl that came with the server works, I will try adding things to it and see when it breaks. And I found when it breaks, but it does not help me much, maybe someone else could have an idea...

Basically, all works (or breaks, but with sympotms that it would work otherwise) once the following section is enabled:

#
# Tcl Configuration
#
ns_section "ns/server/${server}/tcl"
        ns_param autoclose      on
        ns_param debug          true
        #
        # This is where this server's private Tcl library is. All .tcl files
        # in this directory are parsed when AOLserver starts. The crucial
        # procedures used in OpenACS are defined through this library
        #
        ns_param library "${homedir}/servers/${server}/tcl"

Once it is enabled, I get a HTTP 404 (File not found). If I comment it out, I get a 500 (Internal server error), but server log shows that it tried to parse index.tcl, could not find ad_parameter procedure and gave up. If I replace normal index.tcl with a dummy one like this:

ns_write "hello"
everything works perfectly.

I type it as I keep on experimenting. Before I moved onto "salami" tactics, I renamed modules/tcl8.3 (see earlier postings) back into modules/tcl. I have just renamed it again, let's see what happens...

Now an error is different: it is again a 500, but now it complaints in the log that _ns_dirlist could not be found (referenced in ns_param directoryproc. I've just commented the string out completely, trying again...

Same error, but this time I am guessing this is a call from one of ACS .tcl scripts... Let's kill it there as well... No, wait, let's do some search on OpenACS about _ns_dirlist... Here, this seems like a valid reference: https://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0001AX&topic_id=OpenACS&topic=11, let's look through it... Ok, let's set EnableAbstractURLsP to 0 in ad.tcl and try restarting... BINGO! It works! Hurray to the community efforts!!

Thanks, everybody, the problem is solved.