Skip to content

Instantly share code, notes, and snippets.

@giansalex
Last active July 22, 2020 01:05
Show Gist options
  • Save giansalex/f9b6979be40f9d0c1900fb2c903ac3a7 to your computer and use it in GitHub Desktop.
Save giansalex/f9b6979be40f9d0c1900fb2c903ac3a7 to your computer and use it in GitHub Desktop.
Nssm Service Manager Configuration - Run php webserver as Windows Service

Service name is 'PHP001'.

Install

nssm install PHP001

withou GUI

nssm install PHP001 C:\xampp\php\php.exe -S 127.0.0.1:8099

Config

nssm set PHP001 Application C:\xampp\php\php.exe
nssm set PHP001 AppDirectory C:\xampp\www\app
nssm set PHP001 AppParameters -S 127.0.0.1:8099

View GUI

nssm edit PHP001

Control Commands

nssm start PHP001
nssm stop PHP001
nssm restart PHP001

Remove

nssm remove PHP001

More

https://nssm.cc/commands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment