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 ...
随机推荐
- 【原创】java NIO FileChannel 学习笔记 FileChannel实现分析 即FileChannelImpl分析
上文已经说了FileChannel是一个抽象类,FileChannelImpl是其实现,接下来介绍FileChannelImpl,参考代码来自OpenJDK7 首先 public class File ...
- 导出生成xsl文件
public String expData() throws Exception{ List<SubArea> list = subAreaService.fin ...
- HTML5 Audio/Video 标签,属性,方法,事件汇总 (转)
HTML5 Audio/Video 标签,属性,方法,事件 <audio> 标签属性:src:音乐的URLpreload:预加载autoplay:自动播放loop:循环播放contro ...
- 在单链表和双链表中删除倒数第k个结点
题目: 分别实现两个函数,一个可以删除单链表中倒数第K个节点,另一个可以删除双链表中倒数第K个节点. 要求: 如果链表长度为N,时间复杂度达到O(N),额外空间复杂度达到O(1). 解答: 让链表从头 ...
- 【Tarjan缩点】POJ2186 Popular Cows
Popular Cows Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 35644 Accepted: 14532 De ...
- CSS(二) 颜色 盒模型 文字相关 border
一.颜色 rgb(r,g,b) rgb取值 0-255 分别是 色光三元色 red green blue rgba(r,g,b,a) rgb同上 a 是 alpha 代表透明度 colot ...
- sql servel 报错:将 expression 转换为数据类型 int 时出现算术溢出错误。
执行sql语句:SELECT AVG( DATEDIFF(s,s.CreatedDate,s.SendDate) ) AS submitTime FROM dbo.SmsSend AS s ...
- 购物车css样式效果
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- 终于理解kalman滤波
2017拜拜啦,怎么过元旦呢?当然是果断呆实验室过... 应该是大二的时候首次听说kalman,一直到今天早上,我一看到其5条"黄金公式",就会找各种理由放弃,看不懂呀...但是研 ...
- 解析库-beautifulsoup模块
# -*- coding: utf-8 -*- from bs4 import BeautifulSoup # 安装:pip install beautifulsoup4 # Beautiful So ...