• nginx配置优化-生产环境应用版


    user  www www;
    worker_processes auto;
    worker_cpu_affinity auto;
    error_log  /usr/local/nginx/logs/error.log  warn;
    pid nginx.pid;
    worker_rlimit_nofile 65535;
    
    events
    {
    	use epoll;
    	multi_accept on;
    	worker_connections 65530;
    }
    
    http
    {
    	include       mime.types;
    	default_type  application/octet-stream;
    	charset utf-8;
    	server_tokens off;
    	sendfile on;
    	tcp_nopush on;
    	tcp_nodelay on;
    	keepalive_timeout 40s;
    	client_header_timeout 10;
    	client_body_timeout 10;
    	client_header_buffer_size 4k;
    	server_names_hash_bucket_size 128;
    	large_client_header_buffers 4 32k;
    	client_max_body_size 100m;
    	send_timeout 10;
    	reset_timedout_connection on;
    	open_file_cache max=102400 inactive=20s;
    	open_file_cache_min_uses 1;
    	open_file_cache_valid 30s;
    
    	fastcgi_connect_timeout 300;
    	fastcgi_send_timeout 300;
    	fastcgi_read_timeout 300;
    	fastcgi_buffer_size 128k; 	   #出现110错误需要更改相应大小值
    	fastcgi_buffers 256 128k;
    	fastcgi_busy_buffers_size 256k;    #fastcgi_buffers的两倍
    	fastcgi_temp_file_write_size 256k; #fastcgi_buffers的两倍
    
    	proxy_connect_timeout 90;
    	proxy_send_timeout 90;
    	proxy_read_timeout 90;
    	proxy_buffer_size 128k; 	   #出现110错误需要更改相应大小值
    	proxy_buffers 256 128k;
    	proxy_busy_buffers_size 256k;    #proxy_buffers的两倍
    	proxy_temp_file_write_size 256k; #proxy_buffers的两倍
    
    	gzip  on;
    	gzip_min_length     256;
    	gzip_buffers        4 16k;
    	gzip_http_version   1.1;
    	gzip_vary on;
    	gzip_comp_level 5;
    	gzip_disable "MSIE [1-6].";
    	gzip_proxied any;
    	gzip_types
    		application/atom+xml
    		application/javascript
    		application/json
    		application/ld+json
    		application/manifest+json
    		application/rss+xml
    		application/vnd.geo+json
    		application/vnd.ms-fontobject
    		application/x-font-ttf
    		application/x-web-app-manifest+json
    		application/xhtml+xml
    		application/xml
    		font/opentype
    		image/bmp
    		image/svg+xml
    		image/x-icon
    		text/cache-manifest
    		text/css
    		text/plain
    		text/vcard
    		text/vnd.rim.location.xloc
    		text/vtt
    		text/x-component
    		text/x-cross-domain-policy;
    
    	log_format access '{"@timestamp":"$time_iso8601",'
    			'"host":"$server_addr",'
    			'"clientip":"$remote_addr",'
    			'"size":$body_bytes_sent,'
    			'"responsetime":$request_time,'
    			'"upstreamtime":"$upstream_response_time",'
    			'"upstreamhost":"$upstream_addr",'
    			'"http_host":"$host",'
    			'"url":"$uri",'
    			'"xff":"$http_x_forwarded_for",'
    			'"referer":"$http_referer",'
    			'"agent":"$http_user_agent",'
    			'"status":"$status"}';
    	access_log  /usr/local/nginx/logs/access.log  access;
    	server {
    		listen 80;
    		server_name localhost;
    		index index.html index.php;
    		root /data/www/default;
    		access_log /usr/local/nginx/logs/access.log;
    		error_log /usr/local/nginx/logs/error.log;
    
    		if (!-e $request_filename) {
    			rewrite  ^(.*)$  /index.php?s=$1  last;
    			break;
    		}
    
    
    		location ~ .php {
    			expires  -1;
    			fastcgi_pass 127.0.0.1:9000;
    			fastcgi_index  index.php;
    			fastcgi_split_path_info ^(.+.php)(.*)$;
    			fastcgi_param PATH_INFO $fastcgi_path_info;
    			fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    			include        fastcgi_params;
    		}
    	}
    }
    

      

  • 相关阅读:
    FoveaBox:细节差别,另一种DenseBox+FPN的Anchorfree方案 | IEEE TIP 2020
    Nonlocal Network:人类早期在CV驯服Transformer尝试 | CVPR 2018
    Anchorfree目标检测综述 Dense Prediction篇
    RepLKNet:不是大卷积不好,而是卷积不够大,31x31卷积了解一下 | CVPR 2022
    SaccadeNet:使用角点特征进行twostage预测框精调 | CVPR 2020
    SAPD:FSAF升级版,合理的损失值加权以及金字塔特征选择 | ECCV 2020
    Guided Anchoring:在线稀疏anchor生成方案,嵌入即提2AP | CVPR 2019
    Anchorfree目标检测综述 Keypointbased篇
    FPT:又是借鉴Transformer,这次多方向融合特征金字塔 | ECCV 2020
    FSAF:嵌入anchorfree分支来指导acnhorbased算法训练 | CVPR2019
  • 原文地址:https://www.cnblogs.com/shansongxian/p/9989631.html
Copyright © 2020-2023  润新知