nginx.conf文件说明
来源:互联网 发布:粉碎食品安全网络谣言 编辑:程序博客网 时间:2024/05/23 05:10
nginx.conf文件说明
#Nginx所有用户和组,window下不指定#user nobody;#工作的子进程数量(通常等于CPU数量或者2倍于CPU)worker_processes 1;#错误日志存放路径#error_log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info;#指定pid(进程id)存放文件#pid logs/nginx.pid;#执行的事件events { #允许最大连接数 worker_connections 51200;}http { # MIME类型就是设定某种扩展名的文件用一种应用程序来打开的方式类型 include mime.types; #默认类型——八字节数据流 default_type application/octet-stream; #定义日志格式 #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #生成日志 #access_log logs/access.log main; #发送文件 sendfile on; #打开tcp通道 #tcp_nopush on; #活动时间 #keepalive_timeout 0; keepalive_timeout 65; #打开gzip数据流压缩 #gzip on; #对于服务的配置 server { #端口号(如果你本地安装了其他Web服务器,为了避免冲突,这里需要修改) listen 80; #服务名,本地或者www.abc.com *.abc.com server_name localhost; #设置字符集 #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; # } #}}
0 0
- nginx.conf文件说明
- nginx.conf文件说明
- Nginx配置文件nginx.conf文件说明
- nginx.conf配置说明
- nginx.conf 说明 注释
- nginx.conf配置说明
- nginx.conf 配置文件说明
- Nginx.conf配置说明
- Nginx配置文件nginx.conf说明
- nginx nginx.conf配置说明
- nginx.conf的配置文件说明
- nginx.conf 配置文件中文说明
- nginx.conf 配置文件中文说明
- nginx.conf配置与说明
- nginx.conf一般配置说明
- nginx.conf文件
- Snort.conf 文件说明
- vsftpd.conf文件说明
- swift3.0的一些知识
- 框架 day79 涛涛商城项目-业务中添加redis缓存,jedis使用,redis集群搭建
- Http 状态码详解
- mysql 常用修改表的SQL语句
- SDAutoLayout的使用方法
- nginx.conf文件说明
- Spark 检查点
- [SPOJ687]REPEATS - Repeats(后缀数组+st)
- runtime
- 64位进程调用32位dll的解决方法
- JAVA高并发
- HTML常见的DTD
- 敏捷教练的妥协艺术
- html&css学习笔记