#user  nobody;
worker_processes 1; #error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info; #pid logs/nginx.pid; events {
worker_connections 1024;
} http {
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_nopush on; #keepalive_timeout 0;
keepalive_timeout 65; #gzip on; server {
listen 89;
server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; # 静态页面目录
root E:\BIM\dist;
# 默认首页
index index.html; location / {
# 用户浏览器端的缓存设置
location ~ .*\.(jpg|jpeg|gif|png|swf|htm|html|json|xml|svg|woff|ttf|eot|map|ico)$ {
expires 10d;
}
location ~ .*\.(js|css)?$ {
expires 1h;
}
location ~* \.(css|js|jpg|jpeg|gif|png|swf|htm|html|json|xml|svg|woff|ttf|eot|map|ico)$ {
if (-f $request_filename) {
break;
}
}
# 动态页面,交给tomcat处理
if ( !-e $request_filename) {
proxy_pass http://192.168.124.6:8888;
}
} #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 ssl;
# server_name localhost; # ssl_certificate cert.pem;
# ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on; # location / {
# root html;
# index index.html index.htm;
# }
#} }

  

nginx的配置文件 【nginx.conf】的更多相关文章

  1. Nginx配置配置文件nginx.conf的设置

    引用自:http://www.ha97.com/5194.html #定义Nginx运行的用户和用户组user www www; #nginx进程数,建议设置为等于CPU总核心数.worker_pro ...

  2. Nginx的配置文件nginx.conf配置详解

    user nginx nginx; #Nginx用户及组:用户 组.window下不指定 worker_processes 8; #工作进程:数目.根据硬件调整,通常等于CPU数量或者2倍于CPU. ...

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

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

  4. Nginx的配置文件nginx.conf解析

    安装openresty的nginx.conf配置文件 0.ng运行的用户和用户组 1.ng进程数,设置为CPU总核心数 2.ng错误日志 3.进程文件,有时ng启动不了,将进程文件删除即可. 4.单进 ...

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

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

  6. Nginx安装及配置文件nginx.conf详解

    1.安装Nginx 在安装Nginx之前,需确保系统已经安装了gcc. openssl-devel. pcre-devel和zlib-devel软件库. 下面是Nginx安装过程: wget http ...

  7. Nginx安装与配置文件nginx.conf详解

    引用“http://ixdba.blog.51cto.com/2895551/790611” 1.安装Nginx在安装Nginx之前,需确保系统已经安装了gcc. openssl-devel. pcr ...

  8. Nginx 配置文件 nginx.conf 详解

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

  9. Nginx源码研究六:NGINX的配置文件分析

    上一篇写到nginx的各个模块的配置信息的存储结构,大体描述了对配置信息的配置项生成,定制,初始化过程.这里重点研究实现定制的过程,所谓实现定制,这里指的是,nginx系统提供使用者定义nginx的配 ...

  10. nginx默认配置文件解释

    nginx默认配置文件 nginx.conf 介绍: 全局配置 user  nginx; 设置nginx服务的系统使用用户 worker_processes  1; 工作进程数(建议和CPU核心数保持 ...

随机推荐

  1. hrbust-1545-基础数据结构——顺序表(2)

    http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=1545 基础数据结构——顺序表(2) ...

  2. 编写shellcode的几种姿势

    今天开始在做hitcon-training的题目,做到lab2就发现了自己的知识盲区,遇到无法执行shell的情况,需要自己打shellcode执行cat flag 操作 经过一系列的搜索,发现了几种 ...

  3. 使用Xcode连接开源中国

    故事背景: 今天加入一个新的项目组,其实也就是包括我在内就两个人,由于对方在开源中国上建的项目我没法使用. 所以由我接手第一个任务:就是在开源中国上搭建git项目组 前提条件:xcode和 Git(h ...

  4. 简单css动画 fadeIn fadeOut flash

    考虑兼容性采用 -webkit- -o- -mos- -ms- @keyframes fadeIn{ 0%{ opacity: 0; display: block; } 100%{ opacity: ...

  5. Vue开发微信公众号默认背景为灰色

    最近公司有一个项目,使用Vue开发微信公众号,开发过程遇到一个问题,即设计图的整体背景是白色的,但是公众号里默认的背景是浅灰色,如果某个页面高度没能占满一屏,就会露出浅灰色的默认背景,会显得很不协调. ...

  6. (20)zabbix触发器triggers

    触发器是什么 触发器(triggers)是什么?触发器使用逻辑表达式来评估通过item获取到得数据是处于哪种状态,item一收回数据,讲解任务交给触发器去评估状态,明白触发器是怎么一回事了把?在触发器 ...

  7. Python9-反射-day27(大年初三)

    复习 class 类名(父类,父类2): 静态属性 = '' #静态属性 类属性 def __init__(self): #初始化方法 self.name = 'alex' def func(self ...

  8. PAT Basic 1068

    1068 万绿丛中一点红 对于计算机而言,颜色不过是像素点对应的一个 24 位的数值.现给定一幅分辨率为 M×N 的画,要求你找出万绿丛中的一点红,即有独一无二颜色的那个像素点,并且该点的颜色与其周围 ...

  9. VisionPro显示隐藏搜索区域

    假如我们需要显示两张图,一张显示CogPMAlignTool工具不带搜索区域的,一张显示CogPMAlignTool工具带搜索区域的图像 VisionPro显示隐藏搜索区域 VisionPro显示隐藏 ...

  10. JavaScript括号中什么什么不加引号什么时候加引号?

    *****我的QQ号:1539832180.欢迎一起讨论学习.***** 1.如果是你定义的变量,不能加引号. 因为在大多数语言里面,单引号(或双引号)里面的内容表示的都是字符串. 2.如果是你定义的 ...