Windows Nginx Start, stop, and other commands

Source: Internet
Author: User

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 arguments:--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 is simple Display version Information, V not only Display version Information, the configuration parameter information is also displayed.
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

The above describes the Windows Nginx start, stop, and other commands, including the content, I hope the PHP tutorial interested in a friend helpful.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.