nginx [engine x] is popular HTTP and reverse proxy server with lot of features. nginx provides executable files for windows environment. We just need to download and unzip setup file to get started. The official document says we cannot run nginx as windows service.
We can use nssm (non sucking service manager) to install nginx as windows service. nssm monitors the running service and will restart it if it dies.
Install nginx
Download
Nginx stable version(nginx-1.8.0) from http://nginx.org/en/download.html
Unzip setup and copy in C:\nginx-1.8.0 directory. Install nssm
Download nssm zip file from http://nssm.cc/download
unzip it in C:\nssm-2.24 directory.
unzip it in C:\nssm-2.24 directory.
Install nginx as windows service
Run below command to install nginx service
C:\> cd C:\nssm-2.24\win64
C:\> nssm.exe install nginx
It will pop up GUI screen in which we have to provide nginx information. Set the application path to nginx executable present in “C:\nginx-1.8.0”. Explore other options present for recovery, login, dependencies, etc.
Press install service button to install service
Confirm the service installation in services
o Click ctl+R to open RUN prompt
o Type services.msc
Start nginx service and confirm the installation
You are ready to use nginx server.
References:
- http://nginx.org/
- http://nssm.cc/
0 comments:
Post a Comment