Nginx installation Configuration

Source: Internet
Author: User
Tags install openssl temporary file storage

Nginx compilation and Installation Method

Visit the http://nginx.org/en/download.html site to download the corresponding software version, download and unzip the file.

Development Environment required before compilation and Installation

# Yum-y install "development tools"

# Yum-y install "server platform development"

# Yum-y install PCRE-devel

# Yum-y install OpenSSL-devel

#./Configure parameters that can be specified during compilation

#./Configure \

-- Prefix =/usr/local/nginx \

-- Error-log-Path =/data/applogs/nginx/error. log \

-- Http-log-Path =/data/applogs/nginx/access. log \

-- PID-Path =/var/run/nginx. PID \

-- Lock-Path =/var/lock/nginx. Lock \

-- User = nginx \ specifies the user identity of the nginx thread

-- Group = nginx \

-- With-http_ssl_module \ load SSL module

-- With-http_flv_module \ supports FLV Module

-- With-http_stub_status_module \ supports viewing nginx working status from web pages

-- With-http_gzip_static_module \ supports gzip compression module

-- Http-client-body-temp-Path =/usr/local/nginx/client/\ the location of the file to be temporarily stored when the client requests, such as uploading files.

-- Http-proxy-temp-Path =/usr/local/nginx/Proxy/\ as the reverse proxy server. The temporary file storage directory generated when the backend server responds.

-- Http-FastCGI-temp-Path =/usr/local/nginx/fcgi/\ cache directory for fcgi forwarding

-- Http-uwsgi-temp-Path =/usr/local/nginx/uwsgi \ protocol used on the Web server of reverse proxy Python

-- Http-scgi-temp-Path =/usr/local/nginx/scgi \ cache directory used for reverse proxy scgi

-- With-PCRE supports regular expressions

# Make & make install


---------------------------------------------------------------------------

Configuration File Format

--------------------------------------------------------------------------

The nginx configuration file. Comments starting with "#" must end with a semicolon.

Type of nginx basic configuration:

Configuration items used for debugging and problem locating

Required configuration items for normal operation

Performance Optimization Configuration items

Event configuration, which is the core configuration.

The main core configuration section is used to configure the features of the core module.

The HTTP {HTTP core configuration segment is used to configure the features of the HTTP module.

Parameter Name value 1 [value 2]; define parameter

}

Configuration File support supports all variables, which are divided into module built-in variables and User-Defined variables.

Set var_name value; User-Defined variable setting method.

----------------------------------------------------------------------


This article from the "red face easily die lofty sentiments long" blog, please be sure to keep this source http://wukui.blog.51cto.com/1080241/1557140

Nginx installation Configuration

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.