Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

index.shtml does't load automaically...instead I get a dir listing

Status
Not open for further replies.

mountainbiker

Programmer
Aug 21, 2002
122
GB
I hope I can explain this clearly enough as I am not at the office with the httpd.conf.

First, I have a Unix system with a symbollic link, such as
index.html -> dir1/dir2/html/index.html

When the hostname is hit then index.html loads fine.

Now, I wanted to activate SSI, so I added
DirectoryIndex index.html index.shtml
and added the appropriate mime type

If I browse to
it loads the index.shtml and does the include perfectly

If I break the above link and make
index.shtml -> dir1/dir2/html/index.shtml
I get the directory listing for dir1/dir2/html/
but it doesn't load index.shtml automatically
 
Do you have this line in the directory container?

Options Indexes FollowSymLinks
 
I will have to check when I get into the office, but I assume it is there as it is following the symbolic link in order to reach the correct directory for index.html and index.shtml. It is just that index.html loads, but a directory listing is shown rather than loading index.shtml (when it is the one I am trying to load).
 
okay here is what i got

/opt/webserver/htdocs
index.html symbolic link to dir1/dir2/html/index.html
index.shtml symbolic link to dir1/dir2/html/index.shtml

httpd.conf has
DirectoryIndex index.html index.shtml
AddHandler server-parsed .shtml
AddType text/html .shtml
Options +Includes
<Directory /opt/webserver/htdocs>
RedirectPermanent /index.html </Directory>

Now the <Directory> took care of the displaying the directory listing

However,
does NOT process the SSI
but
WILL process it

Any clues what is going on?
 
The solution that worked for me on 1.3 was

<Location />
AddHandler server-parsed .shtml
AddType text/html .shtml
DirectoryIndex index.shtml
Options +Includes
RedirectPermanent /index.html </Location>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top