Welcome! Log In Create A New Profile

Advanced

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

Posted by kernelforce 
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
[code]
cd c:\nginx
[b]start nginx[/b]
[/code]

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

I used to achieve it as
[code]
cd /d c:\nginx\
instsrv Nginx c:\nginx\srvany.exe
[/code]
and add follow register information
[code]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Nginx\Parameters]
[b]"Application"="C:\\nginx\\nginx.exe"[/b]
"AppParameters"=""
"AppDirectory"="C:\\nginx\\"
[/code]

But these above doesn't work in this version. The reason may be lie in the difference of starting nginx.



Edited 1 time(s). Last edit at 05/02/2009 05:27AM by kernelforce.
I'm using 0.7.59 release and don't understand the "start nginx.exe" command line to provide. Maybe you confuse with 0.7.50 version of Keven Worthington ?

I think we have to wait, according to the mailing-list : http://marc.info/?l=nginx&m=124127304613705&w=2, http://marc.info/?l=nginx&w=2&r=1&s=windows+service&q=b


Related post : http://forum.nginx.org/read.php?10,2513

Haven't found a solution for now on Vista.
Re: How to make the Nginx-0.7.54(Windows official release) RUN AS WINDOWS SERVICE?
July 01, 2009 11:02AM
Maybe you can try to run a batch file instead of the .exe on the:


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

Change to:
"Application"="C:\\nginx\\yourBatch.bat"

On the batch, simple put the:
start nginx command
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 111
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready