title: Set nginx listen ip as variables
body: <p>I have tens of sites listening on multiple ip addresses at nginx.
  For example, </p>
  
  <pre><code>server {listen 172.16.33.1:80; server_name a.com}
  ..
  server {listen 172.16.33.1:80; server_name f.com}
  server {listen 172.16.33.2:80; server_name d.com}
  ..
  server {listen 172.16.33.2:80; server_name r.com}
  server {listen 172.16.33.1:443; server_name aa.com}
  server {listen 172.16.33.2:443; server_name bb.com}
  server {listen 172.16.33.3:443; server_name cc.com}
  </code></pre>
  
  <p>Is there any possible way to set listen ips to variables? Like 
  "$ip1=172.16.33.1; $ip2=172.16.33.2;" and then change conf to </p>
  
  <pre><code>server {listen $ip1:443; server_name aa.com}
  server {listen $ip2:443; server_name bb.com}
  </code></pre>
  
  <p>I know about search and replace in every text editor, but it would be more easy when you change listen ip once to make effect on all corresponding sites.</p>