user nginx nginx;
worker_processes 1;
pid /data/var/run/nginx/nginx.pid;
worker_rlimit_nofile 51200;

events
{
#epoll是多路复用IO中的一种方式
use epoll;
#单个后台的work process进行的最大并发链接数
worker_connections 51200;
}

http{
#设定mime类型,类型由mime.types文件定义
include mime.types;
default_type application/octet-stream;
#设置日志格式

#指定nginx是否调用sendfile来输出文件
sendfile on;

#连接超时时间
keepalive_timeout 60;
tcp_nodelay on;
#声明日志格式,请求的地址,状态,请求ip
log_format access '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';

#设置虚拟主机设置
server{
#侦听80端口
listen 80;
#定义访问域名
server_name lx.workplace.com;
#定义服务器的默认网站根目录位置
root /data/wwwroot/workplace;
#默认请求
location / {
#定义首页索引文件名称
index index.php index.html index.htm;
}

#设置php脚本请求全部转发到fastcgi处理
location ~ .php$ {
#fastcgi端口
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
#fastcgi路径
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
#设置日志
access_log /data/wwwlogs/admin.njw88.com/access.log;
error_log /data/wwwlogs/admin.njw88.com/error.log;
}
}

最新文章

  1. QML 从无到有 3 (自动更新)
  2. 【caffe】train_lenet.sh在windows下的解决方案
  3. 排序算法总结(三)选择排序【Select Sort】
  4. 人工智能深度学习Caffe框架介绍,优秀的深度学习架构
  5. color 的一些处理
  6. trigger,triggerhandler模拟事件
  7. WPF 中资源路径的问题
  8. 按需讲解之Supervisor
  9. FastDFS、nginx配置手记
  10. 自动生成代码工具【JAVA版】
  11. 虚拟机与Docker有何不同?
  12. 【PAT】B1010 一元多项式求导
  13. oracle 与其他数据库如mysql的区别
  14. 【服务器】Https服务配置
  15. c++ 的类 和 类继承, 什么是c++中的基类和派生类?
  16. Adobe漏洞攻击
  17. windows 和 Linux 安装rabbitmq
  18. what's RNA-Seq?
  19. 事后诸葛亮之Alpha十天冲刺之失败总结
  20. zend opcache的最佳设置

热门文章

  1. python:小乌龟turtle
  2. C#学习历程(六)[ref 关键字的使用]
  3. QMainWindow: No such file or directory 问题的解决方法
  4. 重构Java代码的既有设计-影片出租店
  5. Linux下常用压缩、解压缩命令
  6. vue.js 源代码学习笔记 ----- Dep
  7. CUDA Samples: ripple
  8. 每周荐书:机器学习、Java虚拟机、微信开发(评论送书)
  9. 构造字典:DictionaryBase类和SortedList类
  10. 圣诞节为大家推荐一些学习java书籍