Welcome! Log In Create A New Profile

Advanced

Serving dynamically generated files

Gregorio Hernández Caso
February 13, 2012 12:44PM
Hi everybody,

I'm trying to serve dynamically generated TXT files using PHP through
fastcgi_pass, but I have a problem that I can't solve.
This is what I have done:

- The TXT files are going to be used by a "GPRS printer" that read them
from an url (ex: http://server/1234.txt)
- I have configured Nginx to rewrite the request of this files to a PHP
script
- The PHP script returns the TXT contents and the same headers as for an
static TXT file
- 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.

My problem is that the "printer" is not reading the TXT file correctly.
I know that the "printer" is working, because of two things:

- If a create the static 1234.txt file, the "printer" prints it correctly
- 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.

So, my question is... ¿is there any difference of how Nginx serves static
files towards dynamically generated ones?

I've researched through internet and I cannot find an answer :-(

Thanks in advance!
Gregorio
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Serving dynamically generated files

Gregorio Hernández Caso February 13, 2012 12:44PM

Re: Serving dynamically generated files

Max February 13, 2012 01:06PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 264
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready