魏长东

weichangdong

正在查看: 2015年10月日志归档(第 1 页 / 共 2 篇)

nginx保存post数据到access日志

user  www www;
worker_processes  4;
worker_cpu_affinity 01 10 01 10;
worker_rlimit_nofile 51200;

error_log  /data/logs/nginx/error.log error;
#error_log  /var/log/nginx/error.log  notice;
#error_log  /var/log/nginx/error.log  info;

pid        /var/run/nginx.pid;

events {
    use epoll;
    worker_connections  51200;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;
    charset utf-8;

    log_format  main  '$remote_addr "$http_host" $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    log_format  testlog  '$http_x_forwarded_for - $remote_user [$time_local] '
                          '"$request" $status $body_bytes_sent '
                          '"$http_referer" "$http_user_agent" $request_length $request_time';

    log_format  postlog  '$http_x_forwarded_for $remote_addr "$http_host" [$time_local] '
                          '"$request" $status $body_bytes_sent '
                          '"$http_referer" "$http_user_agent" $request_length $request_time "$request_body"';

    #access_log  /var/log/nginx/access.log  main;
    access_log  /data/logs/nginx/access.log main;

    server_names_hash_bucket_size 128;
    client_header_buffer_size 32k;
    large_client_header_buffers 4 32k;
    client_body_buffer_size 1m;
    client_max_body_size 4m;

    sendfile on;
    tcp_nopush     on;
    keepalive_timeout 60;
    tcp_nodelay on;

    #gzip  on;
    include /etc/nginx/conf.d/*.conf;
}

安装php-fpm

rpm -ivh http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm 
 rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
 yum install php php-fpm php-bcmatch php-gd php-mbstring php-mcrypt php-mysql 

开始只是执行了
yum install php php-fpm,发现CI框架直接不能正常使用。