File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Mime type configuration apache server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Mime type configuration apache server" Watch "Mime type configuration apache server" New topic

Mime type configuration apache server

lokesh devineni

Joined: Oct 19, 2010
Posts: 5

Hi all,

This topic is mime type configuration in apache web server.Can any one know these question please reply back,

a) If we can set mime type for certain type of (like PDF) files when they are rendered from apache server?
b) Can we set the mime type for files from specific folder?
c) What is overhead of doing this?
d) Will this impact all the apps which use that apache server? or can we set it for specific app ?

Best Regards,
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

MIME types are configured for apache in various ways, but if I'm not mistaken, for my particular server, the master configuration is a file named /etc/mime.types that is not only used by Apache, but by any other application in the OS that wants to apply MIME types.

You can customize the normal MIME type assignment at a per-folder level using .htaccess. There's also a mod_mime plugin that may help.

You should be able to find details in the apache documentation without too much trouble.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Mime type configuration apache server
It's not a secret anymore!