Welcome! Log In Create A New Profile

Advanced

error_page 404

Set
November 09, 2018 04:04AM
Добрый день.

Коллеги, как заставить nginx игнорировать заголовки Cache-Control и Expires для 404 ответа.

Делаю так:
error_page 404 /error404.php;
location = /error404.php {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_ignore_headers "Cache-Control" "Expires";
proxy_cache_valid 404 10m;
proxy_cache cache;
proxy_pass http://url;
}

Не работает. Что делаю не так?
Subject Author Posted

error_page 404

Set November 09, 2018 04:04AM

Re: error_page 404

Maxim Dounin November 09, 2018 08:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 112
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready