RE: Apache as File Server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx]
Sent: Sunday, November 08, 2009 5:26 AM
To: users@xxxxxxxxxxxxxxxx
Subject: Re: 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



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux