nginx for slots nginx.conf

#usernobody;

worker_processes8;

worker_cpu_affinity0000000100000010000001000000100000010000001000000100000010000000;

#error_loglogs/error.log;

#error_loglogs/error.lognotice;

#error_loglogs/error.loginfo;

#pidlogs/nginx.pid;

worker_rlimit_nofile65536;

events{

useepoll;

worker_connections65536;

}

http{

includemime.types;

default_typeapplication/octet-stream;

#log_formatmain'$remote_addr-$remote_user[$time_local]"$request"'

#'$status$body_bytes_sent"$http_referer"'

#'"$http_user_agent""$http_x_forwarded_for"';

#access_loglogs/access.logmain;

sendfileon;

#tcp_nopushon;

#keepalive_timeout0;

keepalive_timeout60;

gzipoff;

upstreampnfserver{

server10.30.37.197:8080weight=1;

}

server{

listen80;

server_namelhj.renren.com;

client_max_body_size1m;

#charsetkoi8-r;

#access_loglogs/host.access.logmain;

#location/{

#roothtml;

#indexindex.htmlindex.htm;

#}

#error_page404/404.html;

#redirectservererrorpagestothestaticpage/50x.html

#

error_page500502503504/50x.html;

location=/50x.html{

roothtml;

}

#proxythePHPscriptstoApachelisteningon127.0.0.1:80

#

#location~\.php${

#proxy_passhttp://127.0.0.1;

#}

#passthePHPscriptstoFastCGIserverlisteningon127.0.0.1:9000

#

#location~\.php${

#roothtml;

#fastcgi_pass127.0.0.1:9000;

#fastcgi_indexindex.php;

#fastcgi_paramSCRIPT_FILENAME/scripts$fastcgi_script_name;

#includefastcgi_params;

#}

#denyaccessto.htaccessfiles,ifApache'sdocumentroot

#concurswithnginx'sone

#

#location~/\.ht{

#denyall;

#}

location/upload{

fastcgi_pass127.0.0.1:8555;

#includefastcgi.conf;

}

location/{

proxy_passhttp://pnfserver;

proxy_set_headerHost$host;

proxy_set_headerX-Real-IP$remote_addr;

proxy_set_headerX-Forwarded-For$proxy_add_x_forwarded_for;

client_max_body_size10m;

client_body_buffer_size128k;

client_body_temp_path/data/client_body_temp;

proxy_connect_timeout90;

proxy_send_timeout90;

proxy_read_timeout90;

proxy_buffer_size4k;

proxy_buffers432k;

proxy_busy_buffers_size64k;

proxy_temp_file_write_size64k;

proxy_temp_path/data/proxy_temp;

}

location~^/static{

root/data;

indexindex.htmlindex.htm;

expires30d;

}

location/nginx-status{

stub_statuson;

access_logoff;

}

}

#anothervirtualhostusingmixofIP-,name-,andport-basedconfiguration

#

#server{

#listen8000;

#listensomename:8080;

#server_namesomenamealiasanother.alias;

#location/{

#roothtml;

#indexindex.htmlindex.htm;

#}

#}

#HTTPSserver

#listen443;

#server_namelocalhost;

#sslon;

#ssl_certificatecert.pem;

#ssl_certificate_keycert.key;

#ssl_session_timeout5m;

#ssl_protocolsSSLv2SSLv3TLSv1;

#ssl_ciphersALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;

#ssl_prefer_server_cipherson;

#location/{

#roothtml;

#indexindex.htmlindex.htm;

#}

#}

server{

listen443;

server_namelhj.renren.com;

sslon;

ssl_certificate/home/nginx/conf/server.crt;

ssl_certificate_key/home/nginx/conf/server.key;

ssl_session_timeout5m;

#ssl_protocolsSSLv2SSLv3TLSv1;

#ssl_ciphersALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;

#ssl_prefer_server_cipherson;

#location/{

#roothtml;

#indexindex.htmlindex.htm;

#}

location/{

proxy_passhttp://pnfserver;

proxy_set_headerHost$host;

proxy_set_headerX-Real-IP$remote_addr;

proxy_set_headerX-Forwarded-For$proxy_add_x_forwarded_for;

client_max_body_size10m;

client_body_buffer_size128k;

client_body_temp_path/data/client_body_temp;

proxy_connect_timeout90;

proxy_send_timeout90;

proxy_read_timeout90;

proxy_buffer_size4k;

proxy_buffers432k;

proxy_busy_buffers_size64k;

proxy_temp_file_write_size64k;

proxy_temp_path/data/proxy_temp;

}

}

}

相关推荐