LNMP环境中nginx配置详解
2018-04-08 17:34
197 查看
user www www; #配置用户或者组
worker_processes auto; #允许生成的进程数
error_log /home/wwwlogs/nginx_error.log crit; #指定日志路径
pid /usr/local/nginx/logs/nginx.pid; #指定nginx进程运行文件存放地址
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;
events
{
accept_mutex on; #设置网络连接序列化,防止惊群现象发生,默认为on
use epoll; #事件驱动模型
worker_connections 51200; #最大连接数,默认为512
multi_accept on; #设置一个进程是否同时接受多个网络连接,默认为off
}
http
{
include mime.types; #文件拓展名和文件类型映射表
default_type application/octet-stream; #默认文件类型
server_names_hash_bucket_size 128;
client_header_buffer_size 32k; #客户端请求头部的缓冲区大小
large_client_header_buffers 4 32k; #客户请求头缓冲区的大小
client_max_body_size 50m; #设定通过nginx上传文件大小
sendfile on; #允许sendfile方式传输文件,默认为off
tcp_nopush on; //此选项允许或禁止使用socke的TCP_CORK的选项,此选项仅在使用sendfile的时候使用
keepalive_timeout 60; #连接超时时间,默认为75s
fastcgi_connect_timeout 300; #自定义格式
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 256k;
worker_processes auto; #允许生成的进程数
error_log /home/wwwlogs/nginx_error.log crit; #指定日志路径
pid /usr/local/nginx/logs/nginx.pid; #指定nginx进程运行文件存放地址
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;
events
{
accept_mutex on; #设置网络连接序列化,防止惊群现象发生,默认为on
use epoll; #事件驱动模型
worker_connections 51200; #最大连接数,默认为512
multi_accept on; #设置一个进程是否同时接受多个网络连接,默认为off
}
http
{
include mime.types; #文件拓展名和文件类型映射表
default_type application/octet-stream; #默认文件类型
server_names_hash_bucket_size 128;
client_header_buffer_size 32k; #客户端请求头部的缓冲区大小
large_client_header_buffers 4 32k; #客户请求头缓冲区的大小
client_max_body_size 50m; #设定通过nginx上传文件大小
sendfile on; #允许sendfile方式传输文件,默认为off
tcp_nopush on; //此选项允许或禁止使用socke的TCP_CORK的选项,此选项仅在使用sendfile的时候使用
keepalive_timeout 60; #连接超时时间,默认为75s
fastcgi_connect_timeout 300; #自定义格式
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 256k;
相关文章推荐
- Linux下安装Lnmp环境之Nginx 配置文件详解
- LNMP(linux+nginx+mysql+php)服务器环境配置
- CentOS6.5环境使用keepalived实现nginx服务的高可用性及配置详解
- LNMP(linux+nginx+mysql+php)服务器环境配置
- LNMP(linux+nginx+mysql+php)服务器环境配置
- LNMP(linux+nginx+mysql+php)服务器环境配置
- LNMP(linux+nginx+mysql+php)服务器环境配置
- LNMP(linux+nginx+mysql+php)服务器环境配置
- LNMP(linux+nginx+mysql+php)服务器环境配置
- LNMP(linux+nginx+mysql+php)服务器环境配置
- wamp本地环境为静态与lnmp集成环境下nginx为zencart的静态配置
- lnmp+redis+solr+rabbitmq+memcache+nginx_mogilefs_module+jdk1.8.0_73环境配置
- LNMP(linux+nginx+mysql+php)服务器环境配置
- LNMP(linux+nginx+mysql+php)服务器环境配置
- CentOS 7 配置 Nginx + php + mysql 搭建 lnmp 环境过程全纪录
- 配置nginx支持php yum搭建lnmp环境(CentOS6)
- Centos 环境下,有关Nginx安装与配置详解
- centos6.5环境自动化运维之puppet实现nginx反向代理功能及puppet安装配置详解
- LNMP(linux+nginx+mysql+php)服务器环境配置
- 【Nginx】LNMP环境下的后续配置