Last active
February 10, 2024 08:29
-
-
Save reke592/0c58f16e8875e485c58c636ad98ea471 to your computer and use it in GitHub Desktop.
Revisions
-
reke592 revised this gist
Feb 10, 2024 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ @echo Off REM requirements: REM This Nginx build for windows, available at http://nginx-win.ecsds.eu/download/ REM this build has fixed issues related to the 1024 worker_connection limit. REM rar.exe - for archive, replace this if you don't want rar.exe REM Current installation directory of nginx -
reke592 created this gist
Feb 10, 2024 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ @echo Off REM requirements: REM nginx build for windows (fixed issue 1024 limit) - http://nginx-win.ecsds.eu/download/ REM rar.exe - for archive, replace this if you don't want rar.exe REM Current installation directory of nginx pushd c:\nginx REM Log folder name set dt=%DATE:~10,4%%Date:~4,2%%Date:~7,2%%Time:~0,2%%Time:~3,2%%Time:~6,2% set dt=%dt: =0% set tmp=logs%dt% set archive=%tmp%.rar mkdir %tmp% REM move log files to temporary folder move logs\*.log %tmp% REM signal nginx to reopen log files nginx.exe -s reopen REM wait before we archive, to avoid file locks created by nginx -s reopen timeout /t 3 REM archive log files rar a %archive% %tmp% REM remove temporary files del /Q %tmp% rmdir %tmp% if not exist logs_rotate mkdir logs_rotate move %archive% logs_rotate popd