Score:-1

How nginx is listening when Listen is black out

nl flag

Focal Fossa

I commented the listen in server directive: /etc/nginx/sites-available/default

server {

#       listen 0.0.0.0:80 default_server;
#       listen [::]:80 default_server;

and I am not sure if I should get this:

netstat -plant |g ng
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      8417/nginx: master  
tcp        0      0 127.0.0.1:80            127.0.0.1:41618         ESTABLISHED 8418/nginx: worker  
tcp        0      0 127.0.0.1:80            127.0.0.1:41616         ESTABLISHED 8418/nginx: worker  
Soren A avatar
mx flag
What are you trying to achieve ?
Brad Thompson avatar
nl flag
I do not think that your question will answer the OP.
Richard Smith avatar
us flag
By removing the `listen` directives, Nginx is using the [default value](http://nginx.org/en/docs/http/ngx_http_core_module.html#listen).
Brad Thompson avatar
nl flag
true, but is not that exactly what I did?
Score:1
in flag

From the docs:

If the directive is not present then either *:80 is used if nginx runs with the superuser privileges, or *:8000 otherwise.

Brad Thompson avatar
nl flag
is this default *:80 somewhere else in the nginx code? I mean other than /etc/nginx/sites-available/default.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.