nginx+php+mysql源码安装配置
userwww www; master_process on;worker_processes 32;
#worker_cpu_affinity 0001 0010 0100 1000;
pid /var/run/nginx.pid;
# [ debug | info | notice | warn | error | crit ]
error_log/opt/app/nginx/logs/nginx.error_loginfo;
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;
events
{
use epoll;
#maxclient = worker_processes * worker_connections / cpu_number
worker_connections 51200;
}
http
{
include mime.types;
default_typeapplication/octet-stream;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
log_formatmain'$remote_addr - $remote_user [$time_local] $request '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
#access_log/dev/null;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 120;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 128k;
fastcgi_buffers 2 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;
fastcgi_temp_path /dev/shm/fastcgi_temp;
send_timeout 60;
# gzip on;
# gzip_min_length 1k;
# gzip_buffers 4 8k;
# gzip_http_version 1.1;
# gzip_proxied any;
# gzip_types text/plain application/x-javascript text/cssapplication/xml;
# gzip_vary on;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.1;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/cssapplication/xml;
client_max_body_size 10m;
client_body_buffer_size 256k;
client_body_temp_path /dev/shm/client_body_temp;
#
proxy_temp_path /dev/shm/proxy_temp;
# The following includes are specified for virtual hosts
include vhosts/*.conf;
}
页:
[1]