awesome-front-end icon indicating copy to clipboard operation
awesome-front-end copied to clipboard

nginx

Open luqin opened this issue 8 years ago • 0 comments

判断文件是否存在

if (-e "${document_root}/static${uri}") {
    rewrite ^/(.*)$ /static/$uri break;
}
if (-e $request_filename) {
    break;
}
set $static "/static";
try_files $static$uri $static$uri/index.html /index.php;
        location ~* ^/assets/(.*)$ {
            rewrite_log on;

            set $sub_path $1;

            try_files $uri /react-module-dev/assets/$sub_path;
        }

luqin avatar Apr 20 '16 02:04 luqin