cmdref.net - Command Reference

This site is command references for system engineers.

User Tools

Site Tools


Top     OS ( Linux )     Middleware     Protocol     Hardware     Programming ( Shell Script )     SiteMap

Sidebar

Top     SiteMap








Reference











.

middleware:web:nginx:index.html



Middleware

Nginx

References

Commands

configtest

Environment Commands Note
RHEL7/CentOS7 nginx -t


Install

Configuration

/etc/nginx/nginx.conf

Numbers of Core

You can set it to the same number cpu cores.

#grep processor /proc/cpuinfo | wc -l 
worker_processes 2;

maximum number of connections

It specifies the maximum number of connections that one of the worker process can be processed at the same time

#ulimit -n
events {
    worker_connections  1024;
}

hiding of nginx version

http {
        server_tokens off;


/etc/nginx/conf.d/*.conf

DocumentRoot

root   /usr/share/nginx/html;

VirtualServer

server {
    server_name example.com;

}

server {
    server_name example.com www.example.com;
}

server {
    server_name *.example.com;

}
Default Server
server {
    listen *:80 default_server;
    server_name example.com;
}

SSL

server {
    listen 443 ssl;

   (abbr)

    ssl on;
    ssl_certificate /etc/nginx/ssl/xxx.crt;
    ssl_certificate_key /etc/nginx/ssl/xxx.key;
    ssl_session_timeout 5m;
    ssl_ciphers 'AES128+EECDH:AES128+EDH:!aNULL';
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;

   (abbr)
}







middleware/web/nginx/index.html.txt ยท Last modified: 2017/08/10 by admin