getting apache2 to process xml files?

Greg Barniskis nalists at
Fri Nov 11 14:43:55 GMT 2005

bob self wrote:
> I'm running FreeBSD 5.4 and apache2.
> How can I get apache2 to process xml files? Right now it just treats them
> as regular files and uploads them to the browser. I'm not sure how the
> AddType line should be or what module I need to install and load.

You should be asking this in an Apache support forum, since it's not 
specific to FreeBSD (very little about Apache is, beyond installing 
the port and making it start at boot time). Be that as it may...

Use Cocoon?

I could be wrong (never done such a thing) but I don't think what 
you want is nearly as easy as "turn on Apache feature XYZ". You have 
to tell Apache "use external program XYZ to preprocess XML data" and 
then you have to configure/program "XYZ" to do something useful like 
turn your XML into XHTML for the browser (e.g. you probably have to 
write or at least tune some XSL directives specific to your DTD, in 
addition to telling Apache to send XML to your XSL preprocessor).

Greg Barniskis, Computer Systems Integrator
South Central Library System (SCLS)
Library Interchange Network (LINK)
<gregb at>, (608) 266-6348

More information about the freebsd-questions mailing list