###############################nginx.conf 件里文说明
#user nobody; # user 主模块指令,指令nginx worker 执行用户和用户组(user xxxuser xxxgroup) 。默认由nobody执行
worker_processes 1; # worker_processes 主模块指令,指令nginx执行进程数,每一个进程平均耗10m-12m内存,单核为1,多核为n #error_log logs/error.log; # 全局日志 输出级别debug,info,notice,warn,error,crit ,当中debug输出日志最为具体
#error_log logs/error.log notice; #级别 notice
#error_log logs/error.log info; #级别 info #pid logs/nginx.pid; #pid 指令 指定进程id存储位置 events {
worker_connections 1024; #events 指令 指令nginx 工作模式和连接数上限
} http { #http服务器配置
include mime.types; #包括文件mime.types
default_type application/octet-stream; #默觉得二进制流 #日志格式的设定
#log_format main '$remote_addr - $remote_user [$time_local] "$request" ' #HttpLog模块指令,日志输出格式。main为日志名称,能够在access_log指令引用
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #高效文件传输模式,将tcp_nopush和tcp_nodely设置为on
#tcp_nopush on; #keepalive_timeout 0; #client连接保持活动的超时时间,超时后关闭连接
keepalive_timeout 65; #gzip on; #开启gzip压缩 实时压缩输出数据流 #server虚拟主机配置
server {
listen 80; #端口
server_name localhost; #ip或域名,能够多个www.abc.com,127.0.0.1 #charset koi8-r; #编码格式 #access_log logs/host.access.log main; #虚拟主机訪问日志存放路径 location / {
root html;
index index.html index.htm;
} #error_page 404 /404.html; # redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
} # proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#} # deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
} # another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias; # location / {
# root html;
# index index.html index.htm;
# }
#} # HTTPS server
#
#server {
# listen 443;
# server_name localhost; # ssl on;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key; # ssl_session_timeout 5m; # ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on; # location / {
# root html;
# index index.html index.htm;
# }
#} }

版权声明:本文博客原创文章。博客,未经同意,不得转载。

nginx.conf 文中描述的配置文件的更多相关文章

  1. nginx查看配置文件nginx.conf路径

      当你执行 nginx -t 得时候,nginx会去测试你得配置文件得语法,并告诉你配置文件是否写得正确,同时也告诉了你配置文件得路径:  # nginx -t nginx: the configu ...

  2. 【转载】Docker 安装 Nginx 并个性化挂载配置文件 nginx.conf

    首先,系统(3.8以上内核的linux)中安装好 Docker 这个运用程序.由于网络原因,我们下载一个Docker官方的镜像需要很长的时间,甚至下载失败.为此,阿里云容器镜像服务提供了官方的镜像站点 ...

  3. Nginx配置文件nginx.conf中文详解(转)

    ######Nginx配置文件nginx.conf中文详解##### #定义Nginx运行的用户和用户组 user www www; #nginx进程数,建议设置为等于CPU总核心数. worker_ ...

  4. Nginx配置文件(nginx.conf)配置详解(2)

    Nginx的配置文件nginx.conf配置详解如下: user nginx nginx ; Nginx用户及组:用户 组.window下不指定 worker_processes 8; 工作进程:数目 ...

  5. Nginx配置文件(nginx.conf)配置详解

    Nginx的配置文件nginx.conf配置详解如下: user nginx nginx ; Nginx用户及组:用户 组.window下不指定 worker_processes 8; 工作进程:数目 ...

  6. Nginx的配置文件(nginx.conf)解析和领读官网

    步骤一:vi nginx.conf配置文件,参考本博文的最下面总结,自行去设置 最后nginx.conf内容为 步骤二:每次修改了nginx.conf配置文件后,都要reload下. index.ht ...

  7. Nginx配置文件nginx.conf中文详解【转】

    PS:Nginx使用有两三年了,现在经常碰到有新用户问一些很基本的问题,我也没时间一一回答,今天下午花了点时间,结合自己的使用经验,把Nginx的主要配置参数说明分享一下,也参考了一些网络的内容,这篇 ...

  8. 004-mac上安装以及Nginx 配置文件nginx.conf详解

    1.mac上nginx安装 安装brew:go-001-环境部署,IDEA插件 安装nginx: brew search nginx brew install nginx 当然也可以编译安装 安装完以 ...

  9. nginx配置文件nginx.conf 不包括server节点

    整理的一个nginx.conf的配置,不包括server节点介绍 原文请查看,Nginx配置文件(nginx.conf)配置详解 # For more information on configura ...

随机推荐

  1. ORA-01092 ORA-12432: LBAC error: zllegnp:OCIStmtExecute 故障一例

    最近由于数据库hang住,无奈之下直接干掉了pmon进程,再次启动的时候收到了ORA-01092: ORACLE instance terminated. Disconnection forced以及 ...

  2. Swift - 判端网络连接状态,连接类型(3G还是Wifi)

    IJReachability是一个使用Swift写的第三方网络检测类.可以测试网络是否连接,并支持3G和Wifi的检测. 使用样例: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ...

  3. tomcat加载时报The web application [/dmscs] created a ThreadLocal with key of type

    严重: The web application [/dmscs] created a ThreadLocal with key of type [com.opensymphony.xwork2.inj ...

  4. Fragment与FragmentActivity通信封装

    在项目里面会经常用到Fragment与FragmentActivity,比如Fragment之间的界面切换与Fragment之间的值传递等等,为了方便起见我把Fragment和FragmentActi ...

  5. cocos2d-x游戏开发系列教程-坦克大战游戏关卡选择场景的编写下

    上篇文章写了Paddle类来处理精灵的点击.触摸事件,现在我们在Paddle的基础上 写一个MyPaddle类,来处理上一关.下一关.开始游戏按钮的点击事件. 1.类声明如下: class MyPad ...

  6. android调用音乐播放器,三种方

    小弟想请问一下.怎样在自己写的程序中调用系统的音乐播放器呢. 我在google上搜索了.主要是有两种方法,可是都不是我想要的. 第一种是.使用mp3音乐文件的uri.和intent,进行调用.可是这样 ...

  7. 浅谈sqlldr

    1.安装oracle  sqlldr 2.配置sqlldr环境 3java代码的实现 在windows下面sqlldr: sqlldr = “cmd /c start  D:/oracle/produ ...

  8. Effective C++_笔记_条款03_尽可能使用const

    (整理自Effctive C++,转载请注明.整理者:华科小涛@http://www.cnblogs.com/hust-ghtao/) 关键字const多才多艺,语法变化多端.关于const的基本用法 ...

  9. DWZ (JUI) 教程(二):处理信息回馈的通用规范

    在开发过程中,抽象成模型,定义规范是非常有必要的,不仅可以简化代码,提高开发效率,也为自己减少了不少麻烦. 在开发中,因为DWZ这块是我负责,由于代码琐碎,重复度高,没有抽象封装,没有定义规范,别人不 ...

  10. 基于visual Studio2013解决面试题之0401非递归遍历二叉树

     题目