Nginx on Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
pushd "%~dp0" | |
cd .. | |
if "%*" == "" ( | |
tasklist /fi "ImageName eq nginx.exe" |find "nginx.exe" >nul | |
if errorlevel 1 ( | |
start /b nginx.exe | |
) else ( | |
echo nginx.exe is already running. Nothing todoy. | |
) | |
) else if "%*" == "-l" ( | |
tasklist /fi "ImageName eq nginx.exe" | |
) else call nginx.exe %* | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to use
Put it in the
contrib
folder in Nginx For Windows. Then add that folder to PATH.Commands