I'm trying to set up an Nginx, where I want to add two numbers together.
server {
server_name "~^pr-(\d*).review-apps.example.com$";
location / {
set $port 50000+$1;
proxy_pass "http://localhost:$port/test";
}
}
But this doesn't work . (Result is in string. For example "50000+125")
How can I add two numbers in nginx.conf? Is it even possible?