Есть конфиг в котором много локейшинов повторяют почти все параметры, можно ли сделать наследование их?
location ~ ^/api1/(.*) {
set $upstream 127.0.0.1:9000;
rewrite ^/api1/(.*)$ /$1 break;
fastcgi_pass $upstream;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/public/index.php;
fastcgi_param REQUEST_URI $uri$is_args$args;
access_log /var/log/nginx/access_custom.log main;
}
location ~ ^/api2/(.*) {
set $upstream 127.0.0.2:9000;
rewrite ^/api2/(.*)$ /$1 break;
fastcgi_pass $upstream;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/public/index.php;
fastcgi_param REQUEST_URI $uri$is_args$args;
access_log /var/log/nginx/access_custom.log main;
}