Forum: NGINX Accessing binding nginx via Lua

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
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.