Usage instructions for Nginx Windows edition

Source: Internet
Author: User
Tags compact

Nginx version of Windows uses the native Win32 API (non-cygwin simulation layer). The current nginx/windows only uses select as the notification method, so don't expect it to have high performance and scalability. Given this and some known issues, Nginx/windows is still in the beta phase. Nginx/windows and UNIX versions are almost complete, with the exception of XSLT filters, image filters, GeoIP modules, and embedded Perl language support.

To install nginx/windows, you need to download the latest 1.7.6 development version, as all known bug fixes are included on the development Branch, especially for Windows versions. Unzip the downloaded zip file, enter the nginx-1.7.6 directory, and run Nginx. Here is an example of installing under the C Packing directory:

CD C:unzip NGINX-1.7.6.ZIPCD Nginx-1.7.6start nginx

You can run commands at the command line tasklist to view Nginx processes:

C:\nginx-1.7.6>tasklist/fi "imagename eq nginx.exe" Image name           PID Session name     session#    Mem usage===== ========== ======== ============== ========== ============nginx.exe            652 Console                 0      2 780 Knginx.exe           1332 Console                 0      3 (K)

One is the main process and the other is the worker process. If Nginx does not start, review logs\error.log the file to find the cause of the failure. If the log file does not exist, the reason for the failure is recorded in the Windows event log. If a request does not show the desired page, but instead displays the error page, please also review the logs\error.log file.

Nginx/windows uses the working directory as a prefix to complement the relative directories set in the configuration file. For the example installed above, the working directory should be C:\nginx-1.7.6\ (the working directory is basically the same as the directory where the files are run). Directories in the configuration file use "/" instead of "\" for Directory separation:

Access_log   logs/site.log;root         c:/web/html;

Nginx/windows is run as a standard console application, not as a system service. You can use the following command to control:

Nginx-s stop Quick exit
Nginx-s quit Graceful Exit
Nginx-s Reload Change the configuration, start a new work process, gracefully close the previous work process
Nginx-s Reopen Reopen log file

Known Issues
    • Although several worker processes can be started to run, only one process is actually processing requests for all requests.
    • A worker process can handle no more than 1024 concurrent connections.
    • Caches and other modules that require shared memory support do not work in Windows Vista and subsequent versions of the operating system, because the layout of the address space is random in these operating systems.

Features that may be enhanced in the future
    • Run as a system service.
    • Use the I/O completion port as the event model.
    • A model that uses multithreading for single-worker processes.

Usage instructions for Nginx Windows edition

Related Article

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.