nginx.conf文件
user www www;
worker_processes auto;
error_log
/home/wwwlogs/nginx_error.log crit;
pid
/usr/local/nginx/logs/nginx.pid;
#Specifies the value for maximum file descriptors that can be
opened by this process.
worker_rlimit_nofile 51200;
events
{
use epoll;
worker_connections 51200;
multi_accept on;
}
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;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
tcp_nodelay on;
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;
gzip on;
gzip_min_length 1k;
gzip_buffers
4 16k;
gzip_http_version 1.1;
gzip_comp_level 2;
gzip_types
text/plain application/javascript application/x-javascript
text/javascript text/css application/xml application/xml+rss;
gzip_vary on;
gzip_proxied expired no-cache
no-store private auth;
gzip_disable "MSIE
[1-6]\.";
#limit_conn_zone $binary_remote_addr zone=perip:10m;
##If enable limit_conn_zone,add "limit_conn perip 10;" to server
section.
server_tokens off;
access_log off;
server
{
listen 80 default_server;
#listen [::]:80 default_server ipv6only=on;
server_name _;
index index.html index.htm index.php;
root /home/wwwroot/default;
#error_page
404 /404.html;
# Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ {
deny all; }
include enable-php.conf;
location /nginx_status
{
stub_status on;
access_log off;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires
30d;
}
location ~ .*\.(js|css)?$
{
expires
12h;
}
location ~ /.well-known {
allow all;
}
location ~ /\.
{
deny all;
}
if (!-e
$request_filename) {
rewrite ^(.*)$
/index.php?s=/$1 last;
break;
}
access_log /home/wwwlogs/access.log;
}
include vhost/*.conf;
}
nginx.conf文件的更多相关文章
- 借用nginx.vim工具进行语法高亮和格式化配置nginx.conf文件
在生产环境中,我们肯定经常用到nginx.conf文件的编排工作,今天在阅读<决战nginx>的时候无意间看到nginx.vim这个辅助工具,于是百度搜索和实际部署检测了一下,其效果确实让 ...
- 虚拟主机ip配置,nginx.conf文件配置及日志文件切割
今天粗略整理了一下虚拟主机配置,nginx.conf文件的配置,及日志文件的切割,记录如下: nginx虚拟主机配置:1.IP地址配置,2.绑定ip地址和虚拟主机详情:1.ip地址的配置:ifconf ...
- Dockerfile + Nginx.conf文件记录(用于前端项目部署)
Dockerfile + Nginx.conf文件记录(用于前端项目部署) 本教程依据个人理解并经过实际验证为正确,特此记录下来,权当笔记. 注:基于linux操作系统(敏感信息都进行了处理),默认服 ...
- 在k8s中将nginx.conf文件内容创建为ConfigMap挂载到pod容器中
将nginx.conf文件内容创建为ConfigMap user nginx; worker_processes auto; error_log /var/log/nginx/error.log er ...
- docker+nginx搭建tomcat集群(附录)——nginx.conf文件
附录:nginx.conf修改后的文件内容 user root;worker_processes 2; #error_log logs/error.log;#error_log logs/error. ...
- nginx conf 文件
server { listen ; server_name local.light.com; index index.html index.htm index.php; root /home/wwwr ...
- 详解nginx.conf文件配置项(包括负载均衡)
http://www.cnblogs.com/hsapphire/archive/2010/04/08/1707109.html #运行用户 user nobody nobody; #启动进程 wo ...
- nginx.conf文件说明
#Nginx所有用户和组,window下不指定 #user nobody; #工作的子进程数量(通常等于CPU数量或者2倍于CPU) worker_processes 1; #错误日志存放路径 #er ...
- nginx.conf文件配置明细详解
#etnx运行的用户和用户组 user nginx nginx; #工作进程数,建议设置为CPU的总核数 worker_processes ; #全局错误日志定义类型,日志等级从低到高依次为: #de ...
随机推荐
- docker:(1)docker基本命令使用及发布镜像
docker镜像可以完全看作一台全新的电脑使用,无论什么镜像都是对某一东西进行了配置,然后打包后可以快速移植到需要的地方直接使用 省去复杂的配置工作 比如java web项目部署,如果是新部署,需要装 ...
- 任务调度 -----> quartz 不同时间间隔调度任务
Quartz Quartz是OpenSymphony开源组织在Job scheduling领域又一个开源项目,它可以与J2EE与J2SE应用程序相结合也可以单独使用.Quartz可以用来创建简单或为运 ...
- leetcode — linked-list-cycle
/** * Source : https://oj.leetcode.com/problems/linked-list-cycle/ * * Given a linked list, determin ...
- vue cli搭建项目及文件引入
cli搭建方法:需安装nodejs先 1.npm install -g cnpm --registry=https://registry.npm.taobao.org //安装cnpm,用cnpm下载 ...
- input 光标在 chrome下不兼容 解决方案
input 光标在 chrome下不兼容 解决方案 height: 52px; line-height: normal; line-height:52px\9 .list li input[type= ...
- 【CSS初识】
一.CSS是什么? CSS是一种样式表语言,用于为HTML文档定义布局.例如,CSS涉及字体.颜色.边距.高度.宽度.背景图像.高级定位等方面. HTML用于结构化内容:CSS用于格式化结构化的内容. ...
- css实现切角效果
1. 一个切角 思路:如果我们要得到有一个切角的元素,我们只需要使用一个径向渐变就可以达到这个目标,这个渐变需要把一个透明色标放在切角处,然后再相同的位置设置另一个色标,并且把它的颜色设置成我们想要的 ...
- python基础(三)编码,深浅copy
编码,深浅copy encode,decode在python2中使用的一些迷糊,python3中更容易理解 要理解encode和decode,首先我们要明白编码,字符和二进制的相关概念,简单来说,计算 ...
- ppt的那些小事(一)
根据应用场景不同,幻灯片可以分为两大类,演讲型和阅读型 模板资源:(免费) OfficePLUS,微软Office官方在线模板网站!http://www.officeplus.cn/Template/ ...
- Oracle loop循环无法插入数据
以下的测试基于scott用户下的emp表 首先用while循环进行测试,向emp表插入999条数据 declare i emp.empno; begin loop insert into emp(em ...