본문 바로가기
Linux/Nginx

nginx default conf

by 준섭이 2023. 12. 23.
728x90

#### Nginx default conf file

user nginx;
worker_processes 4;  ## cpu core 수
error_log	/var/log/nginx/error.log;
pid /run/nginx.pid

# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
    worker_connections 2048;
}

http {
    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;
    tcp_nodelay          on;
    keepalive_timeout   3600;
    types_hash_max_size 2048;
    client_max_body_size 1G;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    map $uri $custom_content_type {
        default         text/html;
        ~(.*.do)$       text/html;
    }

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;

}

 

'Linux > Nginx' 카테고리의 다른 글

nginx 디렉토리 형식으로 보이게  (1) 2023.12.23
리눅스 nginx 설치  (0) 2020.06.01