零六软件园 > 软件下载 > 网络工具 > 网络共享 > nginx windows v1.13.5 官方版

nginx windows v1.13.5 官方版

软件大小:1.38MB

软件语言:简体中文

软件授权:官方版

软件类别:网络共享

更新时间:2024-03-12

官方网站:

应用平台:/Win8/Win7/WinXP

软件等级:

50%

50%

  • 软件介绍
  • 软件截图

nginx windows是一款方便快捷的的中小型服务器软件,nginx ("engine x") 是一个性能卓越的 HTTP 和 反向代理 网络服务器,也是一个 IMAP/POP3/SMTP 服务器代理。它应用Nginx那样一款轻量的网页服务器也是能使你节约多余的支出!

nginx windows配备主要参数表明:

#界定Nginx运作的客户和用户群

user www www;

#nginx进程数,提议设定为相当于CPU总关键数。

worker_processes 8;

#全局性不正确日志界定种类,[ debug | info | notice | warn | error | crit ]

error_log /var/log/nginx/error.log info;

#进程文档

pid /var/run/nginx.pid;

#一个nginx进程开启的数最多文件描述符数量,标准偏差应该是数最多打开文件数(系统软件的值ulimit -n)与nginx进程数相除,可是nginx分派要求并不匀称,因此提议与ulimit -n的值保持一致。

worker_rlimit_nofile 65535;

#工作模式与线程数限制

events

{

# 参照事情实体模型,use [ kqueue | rtsig | epoll | /dev/poll | select | poll ]; epoll实体模型是Linux 2.6之上版本核心中的性能卓越互联网I/O实体模型,假如跑在FreeBSD上边,就用kqueue实体模型。

use epoll;

#单独进程最大连接数(最大连接数=线程数*进程数)

worker_connections 65535;

}

#设置http网络服务器

http

{

include mime.types; #文件后缀名与文件属性投射表

default_type application/octet-stream; #默认文件属性

#charset utf-8; #默认编号

server_names_hash_bucket_size 128; #网络服务器名称的hash表尺寸

client_header_buffer_size 32k; #文件上传尺寸限定

large_client_header_buffers 4 64k; #设置要求缓

client_max_body_size 8米; #设置要求缓

sendfile on; #打开高效率文件传送方式,sendfile命令特定nginx是不是启用sendfile涵数来輸出文档,针对一般运用设为 on,假如用于开展免费下载等运用硬盘IO重负荷运用,可设定为off,以均衡硬盘与互联网I/O响应速度,减少系统软件的负荷。留意:假如图片表明异常把这个改 成off。

autoindex on; #打开文件目录目录浏览,适合下载服务器,默认关掉。

tcp_nopush on; #防范堵塞

tcp_nodelay on; #防范堵塞

keepalive_timeout 120; #长网络连接超时時间,企业是秒

#FastCGI有关主要参数是为了更好地改进网址的特性:降低資源占有,提升 网站打开速度。下边主要参数看字面意思都能了解。

fastcgi_connect_timeout 300;

fastcgi_send_timeout 300;

fastcgi_read_timeout 300;

fastcgi_buffer_size 64k;

fastcgi_buffers 4 64k;

fastcgi_busy_buffers_size 129k;

fastcgi_temp_file_write_size 129k;

#gzip控制模块设定

gzip on; #打开gzip压缩輸出

gzip_min_length 1k; #最少压缩图片大小

gzip_buffers 4 16k; #压缩缓冲区域

gzip_http_version 1.0; #压缩版本(默认1.1,前面如果是squid2.5请应用1.0)

gzip_comp_level 2; #压缩级别

gzip_types text/plain application/x-javascript text/css application/xml;

#压缩种类,默认就早已包括text/html,因此下边就无需再写了,写进去也不会有什么问题,可是会有一个warn。

gzip_vary on;

#limit_zone crawler $binary_remote_addr 十米; #打开限定IP线程数的情况下必须应用

upstream blog.ha97.com {

#upstream的web服务,weight是权重值,能够依据产品配置界定权重值。weigth主要参数表明权重值,权重值越高被分派到的概率越大。

server 192.168.80.121:80 weight=3;

server 192.168.80.122:80 weight=2;

server 192.168.80.123:80 weight=3;

}

#云虚拟主机的配备

server

{

#监视端口号

listen 80;

#网站域名能够有好几个,用空格符分隔

server_name www.ha97.com ha97.com;

index index.html index.htm index.php;

root /data/www/ha97;

location ~ .*.(php|php5)?$

{

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

include fastcgi.conf;

}

#图片缓存文件时间设置

location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$

{

expires 10d;

}

#JS和CSS缓存文件时间设置

location ~ .*.(js|css)?$

{

expires 2h;

}

#日志文件格式设置

log_format access ‘$remote_addr – $remote_user [$time_local] “$request” ‘

‘$status $body_bytes_sent “$http_referer” ‘

‘”$http_user_agent” $http_x_forwarded_for’;

#界定本云虚拟主机的浏览日志

access_log /var/log/nginx/ha97access.log access;

#对 “/” 开启反向代理

location / {

proxy_pass http://127.0.0.1:88;

proxy_redirect off;

proxy_set_header X-Real-IP $remote_addr;

#后端Web服务端能够根据X-Forwarded-For获得客户真正IP

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

#下列是一些反向代理的配备,可选。

proxy_set_header Host $host;

client_max_body_size 十米; #容许手机客户端要求的较大 单文件字节

client_body_buffer_size 129k; #缓冲区域代理商缓存局端要求的较大 字节,

proxy_connect_timeout 90; #nginx跟后面网络服务器网络连接超时時间(代理商网络连接超时)

proxy_send_timeout 90; #后面网络服务器数据信息传回時间(代理商推送请求超时)

proxy_read_timeout 90; #联接取得成功后,后面网络服务器响应速度(代理商接受请求超时)

proxy_buffer_size 4k; #设定服务器代理(nginx)储存客户头信息内容的缓冲区域尺寸

proxy_buffers 4 32k; #proxy_buffers缓冲区域,网页页面均值在32k下列的设定

proxy_busy_buffers_size 64k; #长时间负荷下缓存尺寸(proxy_buffers*2)

proxy_temp_file_write_size 64k;

#设置缓存文件文件夹大小,超过这一值,将从upstream网络服务器传

}

#设置查询Nginx情况的详细地址

location /NginxStatus {

stub_status on;

access_log on;

auth_basic “NginxStatus”;

auth_basic_user_file conf/htpasswd;

#htpasswd文档的內容可以用apache给予的htpasswd专用工具来造成。

}

#当地动静分离反向代理配备

#全部jsp的网页页面均交给tomcat或resin解决

location ~ .(jsp|jspx|do)?$ {

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_pass http://127.0.0.1:8080;

}

#全部静态数据文档由nginx立即载入不历经tomcat或resin

location ~ .*.(htm|html|gif|jpg|jpeg|png|bmp|swf|ioc|rar|zip|txt|flv|mid|doc|ppt|pdf|xls|mp3|wma)$

{ expires 15d; }

location ~ .*.(js|css)?$

{ expires 2h; }

}

}

nginx windows v1.13.5 官方版软件截图
  • nginx windows