Forum: NGINX Accessing binding nginx via Lua

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2013-10-15 13:42
(Received via mailing list)
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:
http://forum.nginx.org/read.php?2,243705,243705#msg-243705
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2013-10-15 15:30
(Received via mailing list)
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 Dounin
http://nginx.org/en/donation.html
2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2013-10-15 16:11
(Received via mailing list)
Maxim Dounin 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:
http://forum.nginx.org/read.php?2,243705,243718#msg-243718
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2013-10-15 16:38
(Received via mailing list)
Hello!

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

> Maxim Dounin 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 Dounin
http://nginx.org/en/donation.html
This topic is locked and can not be replied to.