Hi,
My very simple php script sends xml content to a browser.
header("Content-Type: text/xml");
print file_get_contents('sample.xml');
After switching from apache to Nginx I started getting the following error:
Error: XML declaration not at beginning of document
1:
2:
3: <?xml version="1.0" encoding="us-ascii"?>
4: <root>
....
It's obvious that something inserts 2 additional lines before the content of the original xml file
and it causes the error. How can I fix it?