8월, 2016의 게시물 표시

nginx 설정정리

1. nginx 설정(universal drective) 위치 : /etc/nginx/nginx.conf user  nginx; #몇개의 thread가 사용될지 정의한다. cpu cores 수를 넣어주면 된다. worker_processes  6;   error_log  /var/log/nginx/error.log warn; pid        /var/run/nginx.pid; events {     # worker process 하나당 몇개의 connection을 처리할지 뜻한다. (최대처리량 = worker process * worker connection)     worker_connections  1024;  } http {     include       /etc/nginx/mime.types;     default_type  application/octet-stream;     log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '                       '$status $body_bytes_sent "$http_referer" '                       '"$http_user_agent" "$http_x_forwarded_for"';     access_log  /var/log/nginx/access.log  main;     sendfile        on;     #tcp_nopush     on;     keepalive_timeout  65;     #gzip  on;    #http 설정 경로     include /etc/nginx/conf.d/*.conf;  }