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