mac上nignx配置文件目录为/usr/local/etc/nginx/
nginx启动时读取该目录下的nginx.conf文件
该文件具体如下:
nginx.conf
1 user zhangquanming staff;#user后面参数为系统用户名及用户group
2 worker_processes 2;
3 pid /tmp/nginx.pid;
4
5
6 events {
7 worker_connections 1024;
8 }
9 http {
10 include /usr/local/etc/nginx/mime.types;
11 default_type application/octet-stream;
12 client_header_buffer_size 32k;
13 gzip on;
14 send_timeout 60000;
15
16 log_format custom '$remote_addr [$time_local] '
17 '"$request" $status $body_bytes_sent '
18 '"$request_body" "$http_user_agent" $request_time';
19 sendfile on;
20 large_client_header_buffers 4 16k;
21 client_max_body_size 300m;
22 client_body_buffer_size 128k;
23 proxy_connect_timeout 3000;
24 proxy_read_timeout 3000;
25 proxy_send_timeout 3000;
26 proxy_buffer_size 64k;
27 proxy_buffers 4 32k;
28 proxy_busy_buffers_size 64k;
29 proxy_temp_file_write_size 64k;
30 uwsgi_connect_timeout 3000;
31 uwsgi_send_timeout 3000;
32 uwsgi_read_timeout 3000;
33
34 include /usr/local/etc/nginx/servers/*.conf;#会把servers下的所有conf文件都包含进来
35 }