Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- location ~ ^/stats/vsimage/([0-9]+)/([0-9]+)/?([0-9]*)/?$ {
- expires 30d;
- try_files /addons/default/modules/stats/img/match/$1vs$2_$3.png /index.php;
- }
- location ~ ^/stats/mergevsimage/([0-9]+)/([0-9]+)/?([0-9]*)/?$ {
- expires 30d;
- try_files /addons/default/modules/stats/img/match_merge/$1vs$2_$3.png /index.php;
- }
- location ~ .php {
- return 403;
- }
- server {
- set $cust_php_allow 0;
- location ~ ^/stats/vsimage/([0-9]+)/([0-9]+)/?([0-9]*)/?$ {
- expires 30d;
- set $cust_php_allow 1;
- try_files /addons/default/modules/stats/img/match/$1vs$2_$3.png /index.php;
- }
- location ~ .php {
- if ($cust_php_allow = 0){
- return 403;
- }
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- }
- server {
- location ~ ^/stats/vsimage/([0-9]+)/([0-9]+)/?([0-9]*)/?$ {
- expires 30d;
- set $cust_php_allow 'yes';
- try_files /addons/default/modules/stats/img/match/$1vs$2_$3.png /index.php;
- }
- location ~ .php {
- if ($cust_php_allow !~ 'yes'){
- return 403;
- }
- fastcgi_pass unix:/var/run/php5-fpm.sock;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement