httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John List <>
Subject Re: [users@httpd] Apache as File Server
Date Sat, 07 Nov 2009 23:55:36 GMT
Nitin Gupta wrote:
> Hi All
> In my application, I have a scenario in which user can upload various 
> files. I am persisting these files on the File System itself. I need 
> to make a http interface on these saved files.

> Can I make use of Apache web server to serve these files from the file 
> system over http protocol?

Yes. That's the basic function of a web server!

> If yes, then please suggest a optimal configuration to make Apache a 
> typical file server.
> Rgds
> n

The default configuration should work just fine.

In order to display directory listings (indexes) of the files, you'll 
want to /avoid/ using the DirectoryIndex directive (which tells Apache 
to display an HTML page such as index.html etc. instead of an an index).

Check out:

In its simplest configuration, Apache will display directory listings of 
the files at and below the web root and allow users to navigate the 
directories and download any file by right clicking on it.

Have fun!


View raw message