Nginx source Installation (a Web server that can do reverse proxy)

Source: Internet
Author: User
Tags what is nginx

What is Nginx?
1.Nginx is a lightweight Web server that can be used as a reverse proxy.
2.Nginx occupies less memory, Nginx took a phased resource allocation technology, making it CPU and memory occupancy rate is very low.
3. Anti-concurrency ability. Processing requests are asynchronous and non-blocking, while Apache is blocking, and nginx can keep low resource consumption and high performance in high concurrency.
4. Highly modular design, writing modules relatively simple, community active, a variety of high-performance modules produced quickly
Nginx Process issues:
Nginx There are at least two processes, one process is called Master, and the other process is called worker. (Always master process multiple threads)
Source Installation:
./configure \
--PREFIX=/USR \--sbin-path=/usr/sbin/nginx \--conf-path=/etc/nginx/nginx.conf \--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 \--user=nginx \--group=nginx \--with-
Http_ssl_module \--with-http_flv_module \--with-http_stub_status_module \--with-http_gzip_static_module \
--http-client-body-temp-path=/var/tmp/nginx/client/\--http-proxy-temp-path=/var/tmp/nginx/proxy/\--
http-fastcgi-temp-path=/var/tmp/nginx/fcgi/\--http-uwsgi-temp-path=/var/tmp/nginx/uwsgi \--http-scgi-
TEMP-PATH=/VAR/TMP/NGINX/SCGI \--with-pcre
#make (or Make-j 4 speed up compilation, how many CPU cores you can write)
#make Install (the program is installed by default under/usr/local/nginx)
syntax check for errors:
#nginx-T
start Nginx:
#systemctl start Nginx
To stop Nginx:
#sytemctl Stop Nginx
To load a configuration file:
#systemctl Reload Nginx

Nginx source Installation (a Web server that can do reverse proxy)

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.