Answer the question
In order to leave comments, you need to log in
Why does the Last-Modified header not reach the client?
I'm trying to set up normal headers. the server returns the Last-Modified header, but it does not reach the client. If you complete the application at the time of setting the header, then it comes. Searches in the application for deleting this title lead to nothing.
server {
server_name host.dev1 www.host.dev1 *.host.dev1;
charset off;
disable_symlinks if_not_owner from=$root_path;
index index.html index.php;
root $root_path;
set $root_path /home/user/data/www/host.dev1;
access_log /var/log/nginx/host.dev1.access.log ;
error_log /var/log/nginx/host.dev1.error.log notice;
listen 192.168.1.16:80;
location / {
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @fallback;
}
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf|pdf)$ {
# expires 3d;
try_files $uri $uri/ @fallback;
}
location / {
try_files /does_not_exists @fallback;
}
}
location @fallback {
error_log /dev/null crit;
proxy_pass http://127.0.0.1:80;
proxy_redirect http://127.0.0.1:80 /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
access_log off ;
}
ssi on;
}
Answer the question
In order to leave comments, you need to log in
What for do you need itssi on;
?
Reading the docs nginx.org/ru/docs/http/ngx_http_ssi_module.html#ss...
By default, the [Last-Modified] header field is removed because the content of the response changes during processing and may contain dynamically generated elements or parts that have changed independently of the original response.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question