Serve static XML files how?

Hi,

a Javascript in one of my Rails templates needs to load a static XML
file. I tried several places to put the actual XML file, and I also
tried to make the file a rails template (tried both .rhtml and .rxml)
and access it via a controller action. None of these ways worked. Does
the lighttpd server know how to serve XML files, or do I need to
configure it first? Or, is there a good workaround?

Ingo W.

Ingo W. wrote:

Hi,

a Javascript in one of my Rails templates needs to load a static XML
file. I tried several places to put the actual XML file, and I also
tried to make the file a rails template (tried both .rhtml and .rxml)
and access it via a controller action. None of these ways worked. Does
the lighttpd server know how to serve XML files, or do I need to
configure it first? Or, is there a good workaround?

Ingo W.

Why can’t you just put it in public/ under ‘whatever.xml’? Content under
public gets served static. If for some reason the file is inaccessible,
it may have something to do with Lighty not serving .xml files under the
right MIME type.