Forum: NGINX How to make the Nginx-0.7.54(Windows official release) RUN AS WINDOWS SERVICE?

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 kernelforce (Guest)
on 2009-05-02 11:46
(Received via mailing list)
Recently, I got Nginx-0.7.54(official Windows binary), it is simply to
install, I'm very apperciate it.

But in this version, Nginx must be started as

cd c:\nginx
start nginx


My question is how to make it run as a windows service?
Which is important for a server to start the nginx service before any
user is loggin on.

I used to achieve it as

cd /d c:\nginx\
instsrv Nginx c:\nginx\srvany.exe

and add follow register information

Windows Registry Editor Version 5.00


"Application"="C:\\nginx\\nginx.exe"
"AppParameters"=""
"AppDirectory"="C:\\nginx\\"


But these above doesn't work in this version. I think the problem may be
lie in the difference of starting nginx. But I don't have any more idea,
please help me, thx.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,1662,1662#msg-1662
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-05-02 16:01
(Received via mailing list)
On Sat, May 02, 2009 at 05:34:59AM -0400, kernelforce wrote:

>
> "Application"="C:\\nginx\\nginx.exe"
> "AppParameters"=""
> "AppDirectory"="C:\\nginx\\"
>
>
> But these above doesn't work in this version. I think the problem may be lie in the 
difference of starting nginx. But I don't have any more idea, please help me, thx.

Look in the event log and c:/nginx/logs/error.log.
As to service, I plan to add capabilty to rus as service without SrvAny.
7a7c51366e39603df74feef200a3a1c1?d=identicon&s=25 Aleksandar Lazic (Guest)
on 2009-05-02 17:51
(Received via mailing list)
On Sam 02.05.2009 17:47, Igor Sysoev wrote:
>On Sat, May 02, 2009 at 05:34:59AM -0400, kernelforce wrote:
>
>> Recently, I got Nginx-0.7.54(official Windows binary), it is simply
>> to install, I'm very apperciate it.

[snipp]

>Look in the event log and c:/nginx/logs/error.log.
>As to service, I plan to add capabilty to rus as service without
>SrvAny.

Maybe also with IOCP ;-)

http://msdn.microsoft.com/de-at/magazine/cc302334(...
http://www.codeproject.com/KB/IP/iocp.aspx
http://www.codeproject.com/KB/IP/iocp_server_client.aspx

BR

Aleks
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-05-02 18:12
(Received via mailing list)
On Sat, May 02, 2009 at 05:44:26PM +0200, Aleksandar Lazic wrote:

> >SrvAny.
>
> Maybe also with IOCP ;-)
>
> http://msdn.microsoft.com/de-at/magazine/cc302334(...
> http://www.codeproject.com/KB/IP/iocp.aspx
> http://www.codeproject.com/KB/IP/iocp_server_client.aspx

IOCP requires another I/O concept: it's requires asynchronous I/O
while select/kqueue/epoll/etc. require non-blocking I/O. However,
nginx was being developped with asynchronous I/O in mind, therefore
I will add single-thread IOCP soon. It should be more scaleble than
select() even with single thread. The second step, multithreaded IOCP,
is more complex since nginx workers are single thread applications,
and the step requires introdution various locks and mutexes.
Fe1cbce6b6b3fa8f72c740c570774ede?d=identicon&s=25 AMP Admin (Guest)
on 2009-05-03 15:04
(Received via mailing list)
How about we all just forget about the windows version and concentrate
on making the linux version all the better.

Better yet, let forget windows even exists for anything internet
related!
2974d09ac2541e892966b762aad84943?d=identicon&s=25 Kernel Force (Guest)
on 2009-05-03 15:16
(Received via mailing list)
I'm looking forward it!!!
You see, if it doesn't run as service, when you log out the server, the
nginx would be terminated. T_T

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,1662,1699#msg-1699
This topic is locked and can not be replied to.