Summary – Install NGINX as a service on Windows.
| NGINX | Host Two Web Apps on Same Server Same Port Different Domain Name Using NGINX.
Download NGINX and NSSM
- Download nginx from official download page which is http://nginx.org/en/download.html Example used In this documentation is nginx 1.14.0
- Extract the file contents to C:\ drive so the directory for nginx is C:\nginx-1.14.0
- Download and install NSSM from the official download page given below. https://nssm.cc/download Example used In this documentation is nssm version 2.2.4.
- Extract the file contents to C:\ drive so the directory for nssm is C:\nssm-2.24
Use NSSM to install NGINX as a service
- Cd to the nssm directory and install nginx as a service .
- After successful install you would be greeted by nssm GUI, then On the application tab set path to
- Set startup directory to
- On the I/O tab type on the Input slow
- Optionally set in the output and error slots.
C:\foobar\nginx\logs\service.out.log and C:\foobar\nginx\logs\service.err.log
- In services manager you will find the new service, start it and test it in browser.
if you like the tutorial please spread the word aand comment below if you have any questions.