Welcome! Log In Create A New Profile

Advanced

expires не корректно задает время суток при использовании fastcgi_pass

Илья Пирогов
September 16, 2010 11:08AM
Доброго времени суток.

Пытаюсь выставить Expires до полуночи:

location /test.php {
fastcgi_pass 127.0.0.1:1234;

include /etc/nginx/fastcgi_params;

fastcgi_param SCRIPT_FILENAME $www_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_ignore_headers Expires; # для наглядности, хотя бэкенд и так
не отдает этот заголовок
ssi on;

expires @24h;
add_header Cache-Control public;
}

И получаю следующий ответ:


1. Cache-Control:
max-age=86400, public
2. Connection:
keep-alive
3. Content-Encoding:
gzip
4. Content-Type:
text/html; charset=utf-8
5. Date:
Thu, 16 Sep 2010 14:57:46 GMT
6. Expires:
Fri, 17 Sep 2010 14:57:46 GMT
7. Keep-Alive:
timeout=20
8. Server:
nginx/0.7.62
9. Transfer-Encoding:
chunked
10. X-Powered-By:
PHP/5.2.13-pl0-gentoo


Т.е. вместо того, что бы выставить Expires до полуночи, nginx выставил его
на 24 часа, что, насколько я понимаю, не правильно.
Я, конечно, понимаю, что правильнее здесь было бы выдавать эти заголовки
бэкендом, но все же хотелось бы понять почему так происходит.

$ nginx -V
nginx version: nginx/0.7.62
configure arguments: --prefix=/usr --conf-path=/etc/nginx/nginx.conf
--http-log-path=/var/log/nginx/access_log
--error-log-path=/var/log/nginx/error_log --pid-path=/var/run/nginx.pid
--http-client-body-temp-path=/var/tmp/nginx/client
--http-proxy-temp-path=/var/tmp/nginx/proxy
--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --with-md5-asm
--with-md5=/usr/include --with-sha1-asm --with-sha1=/usr/include
--with-http_addition_module --with-http_realip_module --with-http_ssl_module
--with-http_perl_module --with-http_stub_status_module
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

expires не корректно задает время суток при использовании fastcgi_pass

Илья Пирогов September 16, 2010 11:08AM

Re: expires не корректно задает время суток при использовании fastcgi_pass

Igor Sysoev September 16, 2010 03:22PM

Re: expires не корректно задает время суток при использовании fastcgi_pass

Илья Пирогов September 17, 2010 08:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 284
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