Nginx

Nginx默认配置语法

2019-05-22  本文已影响0人  燃燃的爸爸

user 设置nginx服务的系统使用用户
worker_processes 工作进程数
error_log nginx的错误日志
pid nginx服务启动时候pid
events {
worker_connections 每个进程允许最大连接数
use 工作进程数
}

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;

    include /etc/nginx/conf.d/*.conf; #子配置文件
}
上一篇 下一篇

猜你喜欢

热点阅读