Author Topic: nginx header expire bug  (Read 4688 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
nginx header expire bug
« on: December 24, 2018, 02:04:43 PM »
I use cwp 7, nginx+apache
Add new domain, add image i.jpg, then in headers no expire value
here is nginx config
Code: [Select]
location / {
location ~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso|woff|ttf|svg|eot|sh)\$ {
root /home/t/public_html/qq.com;
expires max;
try_files \$uri \@backend;
}

error_page 405 = \@backend;
error_page 500 = \@custom;
add_header X-Cache "HIT from Backend";
proxy_pass http://192.168.1.132:8181;
include proxy.inc;
}


is it correct or has typos?
I removed \$ => $ and remove try_files \$uri \@backend; and it start work
just like this
Code: [Select]
location / {
location ~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso|woff|ttf|svg|eot|sh)$ {
root /home/t/public_html/qq.com;
expires max;
# try_files \$uri \@backend;
}

error_page 405 = \@backend;
error_page 500 = \@custom;
add_header X-Cache "HIT from Backend";
proxy_pass http://192.168.1.132:8181;
include proxy.inc;
}
any ideas?