Install and configure nginx in RedHat

Source: Internet
Author: User

1. Download nginx

curl -O http://nginx.org/download/nginx-1.7.3.tar.gz -o /home/tango

2. Install nginx

Extract

tar -zxvf /home/tango/nginx-1.7.3.tar.gz /home/tango/nginx-1.7.3-setup

Prepare Dependencies

yum install pcre-develyum install openssl-devel

Compile, go to the/home/Tango/nginx-1.7.3-setup directory

./configure --prefix=/usr/local/server/nginx-1.7.3 --conf-path=/etc/nginx/nginx.conf --pid-path=/var/run/nginx/nginx.pid --error-log-path=/var/log/nginx/error.log

Wait until compilation is completed... after installation

make && make install

3. Start nginx

/usr/local/server/nginx-1.7.3/sbin/nginx

Access nginx (port 80 by default. If necessary, modify it in the/etc/nginx. conf file)

    server {        listen       8080;        server_name  localhost;

Official nginx documentation


End of this Article

This article from the "Copper Mirror" blog, please be sure to keep this source http://tangoo.blog.51cto.com/9130178/1533004

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.