Nginx Toss Notes (HTTP performance test, compared with Apache)

Nginx Toss Notes (HTTP performance test, compared with Apache)

It is said that nginx (“engine x”) performs better than apache in a high-pressure environment, so I downloaded one to toss about it. Download and compile and install, my compilation process is a bit special: 1. Remove the debugging information, modify the file $nginx_setup_path/auto/cc/gcc, and comment out the line CFLAGS=”$CFLAGS -g”. 2. Since only the performance of the WEB server is tested, FastCGI is not installed. ./configure \ –prefix=/opt/nginx \ –user=www\ –group=www\ –with-http_stub_status_module\ –with-http_ssl_module\ –without-http_fastcgi_module After the installation is complete, copy a bunch of static HTML pages in the production environment to the nginx server. The configuration of my nginx.conf is as follows: worker_processes 8; worker_rlimit_nofile 102400; events { use epoll; worker_connections 204800; } http { include mime.types; default_type application/octet-stream; sendfile on; tcp_nopush on; charset GBK; keepalive_timeout 60; server_names_hash_bucket_size 128; client_header_buffer_size 2k; large_client_header_buffers 4 4k; client_max_body_size 8m; open_file_cache max=102400 inactive=20s; server { listen 80;         Location / { root /tmp/webapps/; index index.html index.htm; } “ “ location = /NginxStatus { stub_status on; access_log off; } “ “ error_page 500 502 503 504 /50x.html; “ “ location = /50x.html { root html; } } } In order to prevent the operating system from becoming a bottleneck, the parameters…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索