Comment

Comment by vidarh

With nginx, you can do dynamic binding in the free version in at least two ways:

1. If you "just" want to map a hostname, to a private IP, you can assign the hostname to a variable, and use the variable in your backend config. This works because Nginx resolves static addresses at start, but resolves names pulled from variables at runtime.

2. If you need to map ports as well, you can use a Lua or Mruby script. E.g. I have a blog post on doing it with mruby here [1], and it's run production sites for a couple of years. This options lets you integrate against pretty much whatever you want.

It's extra hassle, though, of course.

[1] http://hokstadconsulting.com/nginx/mruby-virtualhosts

parent vidarh 8 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton