Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. location ~ ^/stats/vsimage/([0-9]+)/([0-9]+)/?([0-9]*)/?$ {
  2. expires 30d;
  3. try_files /addons/default/modules/stats/img/match/$1vs$2_$3.png /index.php;
  4. }
  5.  
  6. location ~ ^/stats/mergevsimage/([0-9]+)/([0-9]+)/?([0-9]*)/?$ {
  7. expires 30d;
  8. try_files /addons/default/modules/stats/img/match_merge/$1vs$2_$3.png /index.php;
  9. }
  10.  
  11. location ~ .php {
  12. return 403;
  13. }
  14.  
  15. server {
  16.  
  17. set $cust_php_allow 0;
  18.  
  19. location ~ ^/stats/vsimage/([0-9]+)/([0-9]+)/?([0-9]*)/?$ {
  20. expires 30d;
  21. set $cust_php_allow 1;
  22. try_files /addons/default/modules/stats/img/match/$1vs$2_$3.png /index.php;
  23. }
  24.  
  25. location ~ .php {
  26. if ($cust_php_allow = 0){
  27. return 403;
  28. }
  29. fastcgi_pass unix:/var/run/php5-fpm.sock;
  30. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  31. include fastcgi_params;
  32. }
  33. }
  34.  
  35. server {
  36.  
  37. location ~ ^/stats/vsimage/([0-9]+)/([0-9]+)/?([0-9]*)/?$ {
  38. expires 30d;
  39. set $cust_php_allow 'yes';
  40. try_files /addons/default/modules/stats/img/match/$1vs$2_$3.png /index.php;
  41. }
  42.  
  43. location ~ .php {
  44. if ($cust_php_allow !~ 'yes'){
  45. return 403;
  46. }
  47.  
  48. fastcgi_pass unix:/var/run/php5-fpm.sock;
  49. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  50. include fastcgi_params;
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement