httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nitin Gupta" <nitin....@srishtitechnet.com>
Subject RE: [users@httpd] Apache as File Server
Date Mon, 09 Nov 2009 05:52:21 GMT
Thanks John,

 

My main app is running inside a Tomcat. My users will upload images, videos
etc on to the file system through my application running in Tomcat. I will
make use of a virtual host to directly point to these files through apache
web server. I will make use of this virtual host based URL of my files to
publish in the JSP pages.

 

Do let me know if my assumption and design scheme is fair enough.

 

Rgds

Nitin

 

From: John List [mailto:johnlist@gulfbridge.net] 
Sent: Sunday, November 08, 2009 5:26 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache as File Server

 

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:
http://httpd.apache.org/docs/2.0/mod/core.html#options
http://httpd.apache.org/docs/2.0/mod/mod_autoindex.html
and http://httpd.apache.org/docs/2.0/mod/mod_dir.html

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!

John





Mime
View raw message