nginx location 之 动静分离

依据文件后缀引导资源请求流量

location ~* .(html|png|gif|jpg|jpeg|css|js)$ {

                add_header Cache-Control no-store;

                proxy_set_header Host $host;

                proxy_set_header Cookie $http_cookie;

                proxy_set_header X-Real-IP $remote_addr;

                proxy_set_header User-Agent $http_user_agent;

                proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;

                content_by_lua_file conf/zzz.lua;

                proxy_pass http://xxx.xxx.xxx.xxx;

        }

原文地址:https://www.cnblogs.com/natq/p/9275032.html