Windows Nginx Start, stop, and other commands
Under Windows to use Nginx, we need to master some basic operational commands, such as: Start, stop Nginx service, Reload Nginx, and so on, I will do some simple introduction.
1. Start:
C:\server\nginx-1.0.2>start Nginx
Or
C:\server\nginx-1.0.2>nginx.exe
Note: The first one is recommended, the second will keep your cmd window in execution and cannot be manipulated by other commands.
2. Stop:
C:\server\nginx-1.0.2>nginx.exe-s stop
Or
C:\server\nginx-1.0.2>nginx.exe-s quit
Note: Stop is a quick stop nginx, may not save the relevant information; Quit is a complete and orderly stop nginx, and save the relevant information.
3. Re-loading Nginx:
C:\server\nginx-1.0.2>nginx.exe-s Reload
This command is used when configuration information is modified and needs to be re-loaded in these configurations.
4. Reopen the log file:
C:\server\nginx-1.0.2>nginx.exe-s Reopen
5. View Nginx Version:
C:\server\nginx-1.0.2>nginx-v
Nginx:nginx version:nginx/1.0.2
Or
C:\server\nginx-1.0.2>nginx-v
nginx:nginx version:nginx/1.0.2
Nginx:tls SNI support enabled
Nginx:configure ar Guments:--builddir=objs.msvc8--crossbuild=win32--with-debug--prefix=--conf-path=conf/nginx.conf--pid-path=logs /nginx.pid--http-log-path=logs/access.log--error-log-path=logs/error.log--sbin-path=nginx.exe-- Http-client-body-temp-path=temp/client_body_temp--http-proxy-temp-path=temp/proxy_temp--http-fastcgi-temp-path =temp/fastcgi_temp--with-cc-opt=-dfd_setsize=1024--with-pcre=objs.msvc8/lib/pcre-7.9--with-zlib=objs.msvc8/lib /zlib-1.2.3--with-select_module--with-http_realip_module--with-http_addition_module--with-http_sub_module-- With-http_dav_module--with-http_stub_status_module--with-http_flv_module--with-http_gzip_static_module-- With-http_random_index_module--with-http_secure_link_module--with-mail--with-ipv6--with-openssl=objs.msvc8/lib /openssl-0.9.8r--with-openssl-opt=enable-tlsext--with-http_ssl_module--with-mail_ssl_module
Note: v simply displays the version information, v not only displays the version information, but also displays the configuration parameter information.
6. Test or load the specified configuration file:
Test configuration file
C:\server\nginx-1.0.2>nginx.exe-t-C conf/default.conf
Nginx:the configuration file c:\server\nginx-1.0.2/conf/default.conf syntax isOK
Nginx:configuration file c:\server\nginx-1.0.2/conf/default.conf test is successful
Loading the specified configuration file
C:\server\nginx-1.0.2>start nginx.exe-c conf/default.conf
Windows Nginx Basic Commands