Forum Moderators: coopster & phranque

Message Too Old, No Replies

Opening a File Directory in HTML

Urgent

         

fknaut

3:36 pm on Feb 3, 2003 (gmt 0)

10+ Year Member



Anyone know of a way, through html, cgi or perl to display a directory in html and enable the files to be accessible to viewiing, dowloading, printing, etc by clicking on a the filename?

This will be accessed from a Windows 2K based web accessing files on a UNIX server.

jdMorgan

4:30 pm on Feb 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is a server configuration thing, and it's easy to do with Apache, but I don't know about Win2K. Hopefully, a Win2K expert will come along to help you figure it out.

Jim

fknaut

4:43 pm on Feb 3, 2003 (gmt 0)

10+ Year Member



If it wasn't a Win 2K issue, how would it be done?

DaveN

4:54 pm on Feb 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



it's an option to allow directory browsing on the server(default in IIs is OFF)

you can't switch it ON unless you can access IIS on the server

DaveN

andreasfriedrich

5:02 pm on Feb 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



fknaut [webmasterworld.com] wrote on 03:36 2003-02-03 in message #1 [webmasterworld.com]
This will be accessed from a Windows 2K based web accessing files on a UNIX server.

Not sure I get that. Is W2K the server or client? Do you want to display directories that are on the *nix server via a web server running on the W2K box? I´m confused.

Andreas

fknaut

5:37 pm on Feb 3, 2003 (gmt 0)

10+ Year Member



Do you want to display directories that are on the *nix server via a web server running on the W2K box? Yes and have them accessible as if they are hyperlinks.

andreasfriedrich

5:47 pm on Feb 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you want to create the listings statically or dynamically?

fknaut

6:00 pm on Feb 3, 2003 (gmt 0)

10+ Year Member



They need to appears as available, dynamically.

Ron_Carnell

9:17 pm on Feb 3, 2003 (gmt 0)

10+ Year Member



The changes need to go in your configuration file, but it's hard to know exactly WHICH configuration file will rule your site.

The top level config file is httpd.conf and that's the one I'll describe. There will also be a configuration file (or part of httpd.conf) for your individual domain, and it's possible you have an .htaccess file for your site. The syntax will be same in each of the files, and the lowest level one will determine your settings. Here's what you should look for (remembering that yours will be slightly or more-than-slightly different).

<Directory /home>
Options Includes SymLinksIfOwnerMatch ExecCGI
… more lines
</Directory>

The directory will certainly be different than the /home and the options listed may be more or less. What you need to do is add a new parameter to the Options list.

<Directory /home>
Options Indexes Includes SymLinksIfOwnerMatch ExecCGI
… more lines
</Directory>

Be aware that letting everyone see the contents of your directories is considered a security risk. Ergo, the best way to implement this is at the directory level, with an .htaccess file (assuming that is enabled).

andreasfriedrich

10:43 pm on Feb 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Did you find a way to solve this fknaut?

sun818

12:15 am on Feb 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I suppose one would need a network file share between the Windows 2000 server and the Unix box. SAMBA is file service that can connect a Windows to Unix.

andreasfriedrich

12:44 am on Feb 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Either that or have the Win box call a script on the Unix box which produces the directory html doc and sends it back to the Win box.

fknaut

1:25 pm on Feb 7, 2003 (gmt 0)

10+ Year Member



I'm using dirwrap on the unix box to display the directory. The problem is in displaying the files. No matter what directoy I'm in, I get 403 Forbidden when trying to display an individual file.

Here is my settings in httpd.conf - what is wrong with this?

<Directory /users/directory/files/info/>
Options Indexes +FollowSymLinks
##Options ExecCGI
AllowOverride All
</Directory>

Alias /users /users/dmos/files/configs

<Directory "/users/dmos/files/configs">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>