1 message in ru.sysoev.nginxunix: in listen-directive
FromSent OnAttachments
Aleksandar LazicApr 8, 2007 12:36 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:unix: in listen-directiveActions...
From:Aleksandar Lazic (al-n@public.gmane.org)
Date:Apr 8, 2007 12:36:11 pm
List:ru.sysoev.nginx

Hi,

in irc was the follwoing question:

can I also set nginx to listen on unix socket?

I have try this:

http{ server { listen unix:/home/al/nginx.sock; . . } }

But I get a listen on a "random" inet port:

--- netstat -anp|egrep nginx tcp 0 0 0.0.0.0:41825 0.0.0.0:* LISTEN 29319/nginx unix 3 [ ] STREAM CONNECTED 52464 29319/nginx unix 3 [ ] STREAM CONNECTED 52463 29319/nginx

---

--- 2007/04/08 21:34:30 [debug] 29318#0: bind() 0.0.0.0:0 #5 2007/04/08 21:34:30 [notice] 29318#0: using the "epoll" event method 2007/04/08 21:34:30 [debug] 29318#0: counter: B7F98080, 1 2007/04/08 21:34:30 [notice] 29318#0: nginx/0.5.17 2007/04/08 21:34:30 [notice] 29318#0: built by gcc 4.1.2 20061115 (prerelease)
(Debian 4.1.1-21) 2007/04/08 21:34:30 [notice] 29318#0: OS: Linux 2.6.18-4-686 2007/04/08 21:34:30 [notice] 29318#0: sysctl(KERN_RTSIGMAX): 0 2007/04/08 21:34:30 [notice] 29318#0: getrlimit(RLIMIT_NOFILE): 1024:1024 2007/04/08 21:34:30 [debug] 29319#0: write: 6, BF9ED8F6, 6, 0 2007/04/08 21:34:30 [debug] 29319#0: setproctitle: "nginx: master process
sbin/nginx" 2007/04/08 21:34:30 [notice] 29319#0: start worker processes 2007/04/08 21:34:30 [debug] 29319#0: channel 6:7 2007/04/08 21:34:30 [notice] 29319#0: start worker process 29320 2007/04/08 21:34:30 [debug] 29319#0: sigsuspend 2007/04/08 21:34:30 [debug] 29320#0: malloc: 080BB600:6144 2007/04/08 21:34:30 [debug] 29320#0: malloc: B7BD4008:436800 2007/04/08 21:34:30 [debug] 29320#0: malloc: B7B91008:270400 2007/04/08 21:34:30 [debug] 29320#0: malloc: B7B4E008:270400 2007/04/08 21:34:30 [debug] 29320#0: epoll add event: fd:5 op:1 ev:00000001 2007/04/08 21:34:30 [debug] 29320#0: epoll add event: fd:7 op:1 ev:00000001 2007/04/08 21:34:30 [debug] 29320#0: setproctitle: "nginx: worker process" 2007/04/08 21:34:30 [debug] 29320#0: worker cycle 2007/04/08 21:34:30 [debug] 29320#0: epoll timer: -1

---

Was listen designed to listen on unix-socket?!

BR

Aleks