Compile and install Nginx

Source: Internet
Author: User

./configure--prefix=/usr/local/nginx--conf-path=/etc/nginx/nginx.conf--user=nginx--group=nginx--error-log-path =/var/log/nginx/error.log--http-log-path=/var/log/nginx/access.log--pid-path=/var/run/nginx/nginx.pid-- Lock-path=/var/lock/nginx.lock--with-http_ssl_module--with-http_stub_status_module--with-http_gzip_static_ Module--with-http_flv_module--with-http_mp4_module--http-client-body-temp-path=/var/tmp/nginx/client--http-pro Xy-temp-path=/var/tmp/nginx/proxy--http-fastcgi-temp-path=/var/tmp/nginx/fastcgimakemake Install


Make is used to compile, which reads the instruction from the makefile and compiles it.


The make install is used to install the compiled program, which reads the instruction from the makefile and installs it to the specified location.


The Configure command is used to detect the target characteristics of your installation platform. It defines all aspects of the system, including Nginx's allowed connection processing methods, such as it detects if you have CC or GCC, does not require CC or GCC, it is a shell script, and at the end of execution it creates a makefile file. The Nginx Configure command supports the following parameters:



./configure--help Custom Nginx compilation feature, all--without representatives are enabled by default and can be disabled by this option;


--PREFIX=PATH Specifies the Nginx installation location, using/usr/local/nginx by default.

--sbin-path=path sets the Nginx executable path, which defaults to Prefix/sbin/nginx.

--conf-path=path Specify the nginx configuration file storage path, Nginx allows the use of different configuration files to start, through the NGINX-C option, the default profile location is prefix/conf/nginx.conf;

--pid-path=path/name.pid Set the Nginx.pid file location, you can change the location in the nginx.conf configuration file after installation is complete, the default location is Prefix/logs/nginx.pid;

--error-log-path=path/name.log Set the error log location and name, you can change the location in the nginx.conf configuration file after installation is complete, the default location is Prefix/logs/error.log;

--http-log-path=path/name.log HTTP access log path, after installation can change the location in the nginx.conf configuration file, the default location is Prefix/logs/access.log;

--user=name set the user of Nginx worker process, after installation can be changed in nginx.conf configuration file with user instruction, the default is nobody;

--group=name set the user group of the Nginx worker process, which can be changed with the user instruction in the nginx.conf configuration file after installation;

--lock-path=path/name.lock specifying the Lock file location

--with-http_ssl_module supports the HTTPS protocol, which is not compiled by default and needs to be installed at compile time Openssl-devel

--with-http_stub_status_module HTTP status module, which is not compiled by default, can output HTTP current state via web page

--with-http_gzip_static_module enable gzip module for Web page compression on transfer

--with-http_flv_module enable FLV streaming Media module

--with-http_mp4_module enable Httpd_mp4 MP4 format Streaming Media module

Temporary storage path for--http-client-body-temp-path= body

--http-proxy-temp-path= Proxy Temporary storage path

--http-fastcgi-temp-path= fsstcgi Temporary storage path





Compile and install Nginx

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.