location ~* ^/dgdpsportal.+\.(css|js|png|jpg|jpeg|gif|gz|svg|mp4|ogg|ogv|woff)$ {
log_not_found off;
# 关闭日志
access_log off;
# 缓存时间7天
expires 7d;
# 指定上面设置的缓存区域
proxy_cache imgcache;
# # 缓存过期管理
proxy_cache_valid 200 302 1d;
proxy_cache_valid 404 10m;
proxy_cache_valid any 1h;
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
proxy_pass http://dgdpsportal;
}
location ~* ^/dgdpsbasic.+\.(css|js|woff)$ {
# 缓存时间7天
expires 7d;
# 指定上面设置的缓存区域
proxy_cache imgcache;
# 缓存过期管理
proxy_cache_valid 200 302 1d;
proxy_cache_valid 404 10m;
proxy_cache_valid any 1h;
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
proxy_pass http://dgdpsbasic;
}
upstream dgdpsbasic {
server 127.0.0.1:port;
}
location /idatafusionV1{
add_header Cache-Control no-cache;
alias /opt/hikvision/idatafusion/framework/main/idatafusionV1;
}