Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mime Type configuration in apache

 
lokesh devineni
Greenhorn
Posts: 5
Oracle Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi all,

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,
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

a) If we can set mime type for certain type of (like PDF) files when they are rendered from apache server?

The files are just delivered to client by Apache httpd. A file is then rendered or displayed by the client which is usually your browser.
b) Can we set the mime type for files from specific folder?

Not that I'd know. This doesn't make much sense anyway because files and not directories have a specific mime type. Why would you want to configure it based on directories?
You should have a look at the Apache httpd documentation for details. A good start would be the mod_mime module.
c) What is overhead of doing this?

Really not much. This is is the typical work of a web server because each HTTP reply with a body should define a content type header anyway. Moreover Apache httpd used to deliver static content like simple files scales very well. So you could easily build a cluster of multiple machines if one machine really can't handle the load.
d) Will this impact all the apps which use that apache server? or can we set it for specific app ?

In general the server configuration affects all kinds of clients because they are all just HTTP clients from the server's point of view.

Marco

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic