screenshot with syntax highlighting server { listen 198.51.100.1:443 ssl http2; # matches device-N.int.example.net where N is a number from 2 to 254 server_name ~^device-(?<octet>[2-9]|[1-9][0-9]|1[0-9][0-9]2[0-4][0-9]|25[0-4])[.]int[.]example[.]net$; ssl_certificate /etc/ssl/chain/int.example.net.cer; ssl_certificate_key /etc/ssl/private/int.example.net.key; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_pass http://198.51.100.$octet; proxy_cache off; proxy_cache_valid 404 5s; proxy_cache_valid 301 308 5m; proxy_cache_valid any 1m; } }
https://media.infosec.exchange/infosec.exchange/media_attachments/files/111/986/341/927/321/160/original/4cf24e26fe6b4cc1.png