1. location ~* ^/dgdpsportal.+\.(css|js|png|jpg|jpeg|gif|gz|svg|mp4|ogg|ogv|woff)$ {
    2. log_not_found off;
    3. # 关闭日志
    4. access_log off;
    5. # 缓存时间7
    6. expires 7d;
    7. # 指定上面设置的缓存区域
    8. proxy_cache imgcache;
    9. # # 缓存过期管理
    10. proxy_cache_valid 200 302 1d;
    11. proxy_cache_valid 404 10m;
    12. proxy_cache_valid any 1h;
    13. proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
    14. proxy_pass http://dgdpsportal;
    15. }
    16. location ~* ^/dgdpsbasic.+\.(css|js|woff)$ {
    17. # 缓存时间7
    18. expires 7d;
    19. # 指定上面设置的缓存区域
    20. proxy_cache imgcache;
    21. # 缓存过期管理
    22. proxy_cache_valid 200 302 1d;
    23. proxy_cache_valid 404 10m;
    24. proxy_cache_valid any 1h;
    25. proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
    26. proxy_pass http://dgdpsbasic;
    27. }
    28. upstream dgdpsbasic {
    29. server 127.0.0.1:port;
    30. }
    1. location /idatafusionV1{
    2. add_header Cache-Control no-cache;
    3. alias /opt/hikvision/idatafusion/framework/main/idatafusionV1;
    4. }