Compile and install Nginx 1.8.0 in CentOS 7.0

Source: Internet
Author: User

Compile and install Nginx 1.8.0 in CentOS 7.0
System Version: CentOS nginx Nginx1.8.0

Tar zxf nginx-1.8.0.tar.gzcd nginx-1.8.0/vim auto/cc/gcc annotation debug can reduce the size of installed vim src/core/nginx. h hide nginx version information # solve the software package dependency yum install-y pcre-devleyum install-y openssl-devel. /configure -- prefix =/usr/local/nginx -- with-http_ssl_module -- with-http_stub_status_module # compile -- with-http_ssl_module enable http ssl module support https request makemake install

The following operation is a security authentication key for nginx.

Cd/etc/pki/tls/certs/make nginx. pem # create a security authentication file and enter the information mv nginx. pem/usr/local/nginx/conf/

Edit configuration file

vim /usr/local/lnmp/nginx/conf/nginx.conf server {117         listen       443 ssl;118         server_name  localhost;119 120         ssl_certificate       nginx.pem;121         ssl_certificate_key   nginx.pem;122 123         ssl_session_cache    shared:SSL:1m;124         ssl_session_timeout  5m;125 126         ssl_ciphers  HIGH:!aNULL:!MD5;127         ssl_prefer_server_ciphers  on;128 129         location / {130             root   html;131             index  index.php index.html index.htm;132         }133     }

Enable Service

nginx

For more Nginx tutorials, see the following:

Deployment of Nginx + MySQL + PHP in CentOS 6.2

Install and deploy Nginx + uWSGI + Django1.9.7 in Ubuntu 16.04

Build a Web server based on Linux6.3 + Nginx1.2 + PHP5 + MySQL5.5

Performance Tuning for Nginx in CentOS 6.3

Configure Nginx to load the ngx_pagespeed module in CentOS 6.3

Install and configure Nginx + Pcre + php-fpm in CentOS 6.4

Nginx installation and configuration instructions

Nginx log filtering using ngx_log_if does not record specific logs

Nginx details: click here
Nginx: click here

This article permanently updates the link address:

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.