Hi, Guest!
+

How to install Nginx and PHP as Windows services

01-05-2013 nginx php windows Roumen

Nginx

How to easily install and configure Nginx and PHP under Windows OS as system services:

1) - download latest nginx for windows (here), php nts for windows (here) and latest version of winsw (here).

2) - install nginx (simply extract in your desired folder)

3) - install php (simply extract in your desired folder)

4) - edit the config files (nginx.confg, php.ini) as you wish

5) - now create windows services with winsw

5.1) - Copy winsw-1.9-bin.exe into nginx directory as nginx-service.exe

5.2) - Create nginx-service.xml file (edit names and patch as you wish)


 Nginx
 Nginx
 Nginx 1.4.1
 c:\server\nginx\nginx-1.4.1\nginx.exe
 c:\server\nginx\nginx-1.4.1\
 roll
 
 -p c:\server\nginx\nginx-1.4.1\
 -p c:\server\nginx\nginx-1.4.1\ -s stop

5.3) If you use Windows 8, you need to create new file nginx-service.exe.config


  
    
    
  

5.4) In your command prompt (CMD) execute this command (with your correct path):

c:\server\nginx\nginx-1.4.1\nginx-service.exe install

5.5) Now start the new Nginx service from your services

Enjoy! ;)