Accessing binding nginx via Lua

Would it be possible (and how) to access the bindings inside nginx via
Lua?
for an experiment I’d like to change the listening port of a running
nginx
process.

Posted at Nginx Forum:

Hello!

On Tue, Oct 15, 2013 at 07:41:45AM -0400, itpp2012 wrote:

Would it be possible (and how) to access the bindings inside nginx via Lua?
for an experiment I’d like to change the listening port of a running nginx
process.

I can’t really speak of Lua, but given the nginx architecture it’s
highly unlikely to be ever possible. Listen sockets are created
by master process and inherited by workers. In most cases,
workers just can’t open listening sockets due to security
restrictions.


Maxim D.
http://nginx.org/en/donation.html

Maxim D. Wrote:

In most cases, workers just can’t open listening sockets due to security
restrictions.

I’d still like to try, can you point me where a worker binds to the
inherited values?

Posted at Nginx Forum:

Hello!

On Tue, Oct 15, 2013 at 10:11:10AM -0400, itpp2012 wrote:

Maxim D. Wrote:

In most cases, workers just can’t open listening sockets due to security
restrictions.

I’d still like to try, can you point me where a worker binds to the
inherited values?

It just have them in the cycle->listening array.


Maxim D.
http://nginx.org/en/donation.html