ini Nginx - /etc/nginx/nginx.conf

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ini Nginx - /etc/nginx/nginx.conf相关的知识,希望对你有一定的参考价值。

user www-data;
worker_processes auto;
pid /run/nginx.pid;
worker_rlimit_nofile 20480;

events {
    use epoll;
    worker_connections 10240;
    multi_accept on;
}

http {

	##
	# Basic Settings
	##
	client_max_body_size 100m;
    client_body_buffer_size 1m;
    client_body_timeout 10;
    client_header_timeout 15;	
    sendfile on;
    send_timeout 10;
	tcp_nopush on;
	tcp_nodelay on;
	keepalive_timeout 10;
    keepalive_requests 2048;
	types_hash_max_size 2048;
	# server_tokens off;
	# server_names_hash_bucket_size 64;
	# server_name_in_redirect off;

	fastcgi_buffers 8 128k;
	fastcgi_buffer_size 256k;

    proxy_buffer_size   128k;
    proxy_buffers   4 256k;
    proxy_busy_buffers_size   256k;

	include /etc/nginx/mime.types;
	default_type application/octet-stream;

    fastcgi_read_timeout 300; 
	
    ##
	# SSL Settings
	##

	ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
	ssl_prefer_server_ciphers on;

	##
	# Logging Settings
	##
        
    access_log off;
    log_not_found off;
	#access_log /var/log/nginx/access.log;
	#error_log /var/log/nginx/error.log warn;
    error_log /dev/null;

	##
	# Gzip Settings
	##

	gzip on;
	gzip_disable "msie6";

	gzip_vary on;
    gzip_proxied any;
	gzip_comp_level 6;
    gzip_min_length 1024;
    gzip_buffers 16 8k;
	gzip_http_version 1.1;
    gzip_proxied expired no-cache no-store private auth;
	gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

	##
	# Virtual Host Configs
	##

	include /etc/nginx/conf.d/*.conf;
	include /etc/nginx/sites-enabled/*;
}


#mail {
#	# See sample authentication script at:
#	# http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
# 
#	# auth_http localhost/auth.php;
#	# pop3_capabilities "TOP" "USER";
#	# imap_capabilities "IMAP4rev1" "UIDPLUS";
# 
#	server {
#		listen     localhost:110;
#		protocol   pop3;
#		proxy      on;
#	}
# 
#	server {
#		listen     localhost:143;
#		protocol   imap;
#		proxy      on;
#	}
#}

以上是关于ini Nginx - /etc/nginx/nginx.conf的主要内容,如果未能解决你的问题,请参考以下文章

解决 nginx 出现 413 Request Entity Too Large 的问题

CentOS7.2编译安装LNMP

django2.1+uwsgi+nginx部署

django+vue前后端分离项目部署

Nginx安装目录讲解

django- nginx: [emerg] open() "/etc/nginx/proxy_params" 在 /etc/nginx/sites-enabled/myproje