Linux/centos Nginx Installation and configuration agent

Source: Internet
Author: User
Tags openssl

Nginx Version: Version 1.9.3

Note: The package involved in the article can be added to the bottom of the free access

Installing a dependency package with Yum

#yum install gcc zlib zlib-devel OpenSSL openssl-devel pcre pcre-develncurse -y

#cd/USR/LOCAL/SRC

#tar-zxvf/usr/local/src/nginx-1.9.3.tar.gz

#cd nginx-1.9.3

#./configure--prefix=/usr/local/nginx--with-http_realip_module--with-http_sub_module--with-http_gzip_static_ Module--with-http_stub_status_module--with-pcre--with-http_ssl_module

#make && make Install

Configure Nginx

#cd/usr/local/nginx/conf/

#mv nginx.conf Nginx.conf.bak

The following is a simple reverse proxy:

The request to access http://192.168.8.156:80 as shown will be forwarded to http://192.168.0.186:9890

Start method

#/usr/local/nginx/sbin/nginx

You can also use the/etc/init.d/nginxstart|stop|restart method

Upload the Nginx boot script in the attachment to/etc/init.d/

#chmod 755/etc/init.d/nginx//Empowerment

#chkconfig--add nginx//Add Nginx for system service

#chkconfig Nginx on//configure boot from

If you are interested in this, please scan the QR code below for free for more details

Linux/centos Nginx Installation and configuration agent

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.