Is it possible to use a remote file to store servernames? server_name $somevariable-file?
ru at nginx.com
Mon Nov 28 12:08:33 UTC 2011
On Mon, Nov 28, 2011 at 06:52:59AM -0500, anagio wrote:
> Isn't include only for nginx.conf file? How would I add this to the
> sites-available/server file to include a remote file with list of
You can rsync/scp/curl/whatever the file in your preferable
format (with server names one per line), then generate an
nginx.conf syntax-compliant file with "server_name XXX;"
lines, then send the HUP signal (for details, please see
http://nginx.org/en/docs/control.html) to the master nginx
process, and have it update the configuration on the fly.
It's all pretty easy to achieve, and doesn't require adding
the "fetching" functionality to nginx.
More information about the nginx