Hi everybody,<div><br></div><div>I'm trying to serve dynamically generated TXT files using PHP through fastcgi_pass, but I have a problem that I can't solve.</div><div>This is what I have done:</div><div><ul><li>The TXT files are going to be used by a "GPRS printer" that read them from an url (ex: <a href="http://server/1234.txt">http://server/1234.txt</a>)</li>
<li>I have configured Nginx to rewrite the request of this files to a PHP script</li><li>The PHP script returns the TXT contents and the same headers as for an static TXT file</li><li>If a load the URL on a browser, the content and the headers are fine. In fact, if I create the static TXT file with the same content of the PHP generated, my browser shows me exactly the same.</li>
</ul><div>My problem is that the "printer" is not reading the TXT file correctly.</div></div><div>I know that the "printer" is working, because of two things:</div><div><ul><li>If a create the static 1234.txt file, the "printer" prints it correctly</li>
<li>When the printer reads the dynamically generated TXT file, the PHP scripts also sends me an email, so I'm sure that the printer is connecting to the URL.</li></ul><div>So, my question is... ¿is there any difference of how Nginx serves static files towards dynamically generated ones?</div>
</div><div><br></div><div>I've researched through internet and I cannot find an answer :-(</div><div><br></div><div>Thanks in advance!</div><div>Gregorio</div>