Advertisement
Guest User

Untitled

a guest
Dec 13th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. # Example request: http://media1.nguoiduatin.vn/thumb_x680x354/media/bui-the-anh/2017/12/14/tien-le-qua-bot-ql5.jpg
  2. # /thumb_x680x354 se duoc match theo regular expression
  3. location /thumb {
  4. # alias /home/nguoiduatin/media/resize;
  5. if (!-e $request_filename) {
  6. rewrite ^/thumb_x([0-9]+)x/(.*)\.(.*) /gen_thumb_xxx.php?path=$2&w=$1&h=0&ex=$3 last;
  7. rewrite ^/thumb_x([0-9]+)x([0-9]+)/(.*)\.(.*) /gen_thumb_xxx.php?path=$3&w=$1&h=$2&ex=$4 last;
  8. rewrite ^/thumb_xx([0-9]+)/(.*)\.(.*) /gen_thumb_xxx.php?path=$2&w=0&h=$1&ex=$3 last;
  9. }
  10.  
  11. if (-e $request_filename) {
  12. expires max;
  13. add_header Cache-Control public;
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement