Nginx 윈도 서비스 로 설치

1409 단어
nginx windows 버 전 다운로드
sc create ptNginx binpath= "%~dp0srvany.exe" displayname= "ptNginx" start= auto
(sc query ptNginx | find "ptNginx">nul && reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ptNginx\Parameters" /v "Application" /d "%~dp0nginx.exe")
(sc query ptNginx | find "ptNginx">nul && reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ptNginx\Parameters" /v "AppParameters" /d "")
(sc query ptNginx | find "ptNginx">nul && reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ptNginx\Parameters" /v "AppDirectory" /d "%~dp0")
(sc query ptNginx | find "ptNginx">nul && net start ptNginx)
EXIT

start nginx
start nginx

Run the tasklist command-line utility to see nginx processes:
tasklist /fi "imagename eq nginx.exe"

nginx/Windows runs as a standard console application (not a service), and it can be managed using the following commands:
nginx -s stop   fast shutdown
nginx -s quit   graceful shutdown
nginx -s reload  changing configuration, starting new worker processes with a new configuration, graceful shutdown of old worker processes
nginx -s reopen re-opening log files

좋은 웹페이지 즐겨찾기