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: