温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.ms8.com/creating-a-simple-dashboard-panel-for-managing-an-nginx-server-on-windows
点击访问原文链接

Creating a Simple Dashboard Panel for Managing an Nginx Server on Windows

Creating a Simple Dashboard Panel for Managing an Nginx Server on Windows

Making Sense of the Infinite

Unlocking Infinite Possibilities Through Curiosity

November 30, 2024 Creating a Simple Dashboard Panel for Managing an Nginx Server on Windows

Download Latest Stable Nginx for Windows from Nginx Official Website Creating a Simple Dashboard Panel for Managing an Nginx Server on Windows

You should modify the path of your NGINX installation in the script by specifying the exact path to the NGINX executable. This is especially useful on Windows, where NGINX is typically not added to the system PATH by default.

Save the code below to a file named: NginxDashboardPanel.bat

nul echo.OK,Close All Nginx Process goto :eof :startNginx echo. echo.Start Nginx...... IF NOT EXIST "%NGINX_DIR%nginx.exe" ( echo "%NGINX_DIR%nginx.exe" NOT EXSIT goto :eof ) %NGINX_PATH% cd "%NGINX_DIR%" IF EXIST "%NGINX_DIR%nginx.exe" ( echo "start '' nginx.exe" start "" nginx.exe ) echo.OK goto :eof :checkConfNginx echo. echo.Check Nginx Config Files...... IF NOT EXIST "%NGINX_DIR%nginx.exe" ( echo "%NGINX_DIR%nginx.exe" NOT EXSIT goto :eof ) %NGINX_PATH% cd "%NGINX_DIR%" nginx -t -c conf/nginx.conf goto :eof :reloadConfNginx echo. echo.Reload Nginx Config Files...... IF NOT EXIST "%NGINX_DIR%nginx.exe" ( echo "%NGINX_DIR%nginx.exe" NOT EXSIT goto :eof ) %NGINX_PATH% cd "%NGINX_DIR%" nginx -s reload goto :eof :showVersionNginx echo. %NGINX_PATH% cd "%NGINX_DIR%" nginx -V goto :eof" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button">@echo off rem Nginx Dashboard Panel echo ==================begin======================== cls ::ngxin Disk Path set NGINX_PATH=D: ::nginx Work Path set NGINX_DIR=D:\AppServer\nginx\ color 0a TITLE Nginx Dashboard Panel CLS echo. echo. ***** Nginx Dashboard Panel ***** echo. :MENU echo. ***** Nginx Process List ****** ::tasklist|findstr /i "nginx.exe" tasklist /fi "imagename eq nginx.exe" echo. if ERRORLEVEL 1 ( echo nginx.exe NOT FOUND ) else ( echo nginx.exe is OK ) echo. ::************************************************************************************************************* echo. echo. [1] Start Nginx echo. [2] Stop Nginx echo. [3] Restart Nginx echo. [4] Refresh Dashboard Panel echo. [5] Reload Nginx Config Files echo. [6] Check Nginx Config Files echo. [7] Check Nginx Version echo. [0] Exit echo. echo.SWITCH : set /p ID= IF "%id%"=="1" GOTO start IF "%id%"=="2" GOTO stop IF "%id%"=="3" GOTO restart IF "%id%"=="4" GOTO MENU IF "%id%"=="5" GOTO reloadConf IF "%id%"=="6" GOTO checkConf IF "%id%"=="7" GOTO showVersion IF "%id%"=="0" EXIT PAUSE ::************************************************************************************************************* :start call :startNginx GOTO MENU :stop call :shutdownNginx GOTO MENU :restart call :shutdownNginx call :startNginx GOTO MENU :checkConf call :checkConfNginx GOTO MENU :reloadConf call :checkConfNginx call :reloadConfNginx GOTO MENU :showVersion call :showVersionNginx GOTO MENU ::************************************************************************************* ::Underlaying ::************************************************************************************* :shutdownNginx echo. echo.Stop Nginx...... taskkill /F /IM nginx.exe > nul echo.OK,Close All Nginx Process goto :eof :startNginx echo. echo.Start Nginx...... IF NOT EXIST "%NGINX_DIR%nginx.exe" ( echo "%NGINX_DIR%nginx.exe" NOT EXSIT goto :eof ) %NGINX_PATH% cd "%NGINX_DIR%" IF EXIST "%NGINX_DIR%nginx.exe" ( echo "start '' nginx.exe" start "" nginx.exe ) echo.OK goto :eof :checkConfNginx echo. echo.Check Nginx Config Files...... IF NOT EXIST "%NGINX_DIR%nginx.exe" ( echo "%NGINX_DIR%nginx.exe" NOT EXSIT goto :eof ) %NGINX_PATH% cd "%NGINX_DIR%" nginx -t -c conf/nginx.conf goto :eof :reloadConfNginx echo. echo.Reload Nginx Config Files...... IF NOT EXIST "%NGINX_DIR%nginx.exe" ( echo "%NGINX_DIR%nginx.exe" NOT EXSIT goto :eof ) %NGINX_PATH% cd "%NGINX_DIR%" nginx -s reload goto :eof :showVersionNginx echo. %NGINX_PATH% cd "%NGINX_DIR%" nginx -V goto :eofBAT (Batchfile) Related Posts Batch Unlock BitLocker Drives Using Windows PowerShell Why 34% of Websites Worldwide Use WordPress Setting Up Python Web Services on Ubuntu What is WebP, and How Can It Enhance Your Website and App Experience? Remove Windows PowerShell History Web Windows Server Code Source Code Web Server Nginx Dashboard Dashboard Panel Script Language Batch File

Last revised on

December 20, 2024 ←Graphene and Waterborne Polyurethane: The Future of Innovative Wave-Absorbing Coatings What Does Brownian Motion Describe?→ Comments Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Comment *

Name *

Website

Δ

More posts How to Interpret: The 2028 Global Intelligence Crisis February 28, 2026 Model Context Protocol February 26, 2026 Faraday Future: A Persistent Scam December 9, 2025 Afeela: What Brought Honda and Sony Together? December 8, 2025 Search

Tags:

Ad-Blocking Administrator Privileges Algorithm Application APT-Get Install Artificial Intelligence Artificial Intelligence Generated Content Bash Certificate File Cloudflare Code Command Line Concept Cryptocurrency Decentralization Developer Digital Certificate DNS over HTTPS DNS Resolver Domain Name Resolution Domain Name System Economic Encrypt Finance Firmware Formula Google Hardware Homebrew Home Lab Home Network Hypertext Transfer Protocol Secure Internet Investment iOS IPv6 Linux Machine Learning macOS Mathematics Microsoft Windows MikroTik Network Network Attached Storage Network File System Networking Network Management Network Security Network Service Network Switch Nginx NVIDIA Open Source Operating System Opinion Optimization Paradox Philosophy Physics Popular Science PowerShell Prediction Privacy Programming Language Proxy Server Python Quantum Computing Redundant Array of Independent Disks ROS Route Router RouterOS Routing Science Explained Secure Sockets Layer Security Shell Script Small Office Home Office Software SSH System Administration System Management Technology Terminal Theory Ubuntu Universe Unlocking Virtual eXtensible Local Area Network Virtualization Virtual Local Area Network Virtual Private Network VXLAN Web Web Server Wi-Fi WinBox Windows 11 Windows Server WireGuard

Making Sense of the Infinite

Proudly powered by WordPress

智能索引记录