首页 > 其他 > 详细

转载:2.2 Nginx配置的通用语法《深入理解Nginx》(陶辉)

时间:2018-02-23 15:17:16      阅读:224      评论:0      收藏:0      [点我收藏+]

原文:https://book.2cto.com/201304/19625.html

      Nginx的配置文件其实是一个普通的文本文件。下面来看一个简单的例子。
user  nobody;

worker_processes  8;
error_log  /var/log/nginx/error.log error;

#pid        logs/nginx.pid;

events {
    use epoll;
    worker_connections  50000;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    log_format  main  ‘$remote_addr [$time_local] "$request" ‘
                      ‘$status $bytes_sent "$http_referer" ‘
                      ‘"$http_user_agent" "$http_x_forwarded_for"‘;

    access_log  logs/access.log  main buffer=32k;


      在这段简短的配置代码中,每一行配置项的语法格式都将在2.2.2节介绍,出现的events和http块配置项将在2.2.1节介绍,以#符号开头的注释将在2.2.3节介绍,类似“buffer=32k”这样的配置项的单位将在2.2.4节介绍。

转载:2.2 Nginx配置的通用语法《深入理解Nginx》(陶辉)

原文:https://www.cnblogs.com/huiy/p/8461928.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!