#user  nobody;
worker_processes ; #error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info; #pid logs/nginx.pid; events {
worker_connections ;
} 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"'; log_format main-log '[$request_time]$request|$msec|[$time_local]|$remote_addr|$http_x_forwarded_for|$http_user_agent|$request_body|$body_bytes_sent|$status';
log_format bdip17bim-log '[$request_time]$request|$msec|[$time_local]|$remote_addr|$http_x_forwarded_for|$http_user_agent|$request_body|$body_bytes_sent|$status'; #access_log logs/access.log main-log; sendfile on;
#tcp_nopush on; #keepalive_timeout ;
keepalive_timeout ;
client_max_body_size 500M;
client_body_buffer_size 128k; client_header_buffer_size 8k;
large_client_header_buffers 8k; gzip on;
gzip_buffers 16k;
#gzip_http_version 1.0;
gzip_comp_level ;
gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary off;
gzip_disable "MSIE [1-6]\."; proxy_connect_timeout ;
proxy_send_timeout ;
proxy_read_timeout ;
proxy_buffer_size 4k;
proxy_buffers 4k;
proxy_busy_buffers_size 64k; server_names_hash_max_size ;
server_names_hash_bucket_size ; upstream modeltrans{
ip_hash;
server 127.0.0.1: weight=;
} upstream bimdata{
server 127.0.0.1: weight=;
} server {
listen ;
server_name 192.168.0.66;
charset utf-; # location ~* \.(gif|jpg|jpeg|png|css|ico|html|htm|flv|mp4)$ {
# #access_log logs/static.lgsjbim.shlingang.com.log bdip17bim-log;
# root E:/BDIP/ecology;
# } location /static {
autoindex on;
if ($request_method = OPTIONS ) {
add_header Access-Control-Allow-Origin $http_origin;
add_header Access-Control-Allow-Methods "GET, OPTIONS";
add_header Access-Control-Allow-Headers "Authorization";
add_header Access-Control-Allow-Credentials "true";
add_header Content-Length ;
add_header Content-Type "text/plain;charset=utf-8";
return ;
} add_header Access-Control-Allow-Origin $http_origin;
add_header Access-Control-Allow-Credentials true;
add_header Access-Control-Allow-Headers DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type;
add_header Access-Control-Allow-Methods HEAD,GET,POST,PUT,DELETE,OPTIONS; alias E:/BDIP/static.qiyeji.file/bdip-file/;
index index.html index.htm;
} location /lmv/static {
add_header Access-Control-Allow-Origin $http_origin;
add_header Access-Control-Allow-Credentials true;
add_header Access-Control-Allow-Headers DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type;
add_header Access-Control-Allow-Methods HEAD,GET,POST,PUT,DELETE,OPTIONS;
index index.jsp;
access_log logs/static.lmv.lgsjbim.shlingang.com.log bdip17bim-log;
root E:/BDIP/apache-tomcat-7.0./webapps;
} location /lmv {
rewrite ^/lmv/(.*)$ /$ last;
index index.jsp;
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type always;
add_header Access-Control-Allow-Methods HEAD,GET,POST,PUT,DELETE,OPTIONS always;
access_log logs/lmv.lgsjbim.shlingang.com.log bdip17bim-log;
proxy_pass http://127.0.0.1:8091;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
} location /rest/ {
add_header Access-Control-Allow-Origin $http_origin;
add_header Access-Control-Allow-Credentials true;
add_header Access-Control-Allow-Headers DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type;
add_header Access-Control-Allow-Methods HEAD,GET,POST,PUT,DELETE,OPTIONS;
proxy_pass http://modeltrans;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
} location ^~ /4DAnalog/ {
proxy_pass http://127.0.0.1:8091;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
} location ^~ /is/ {
proxy_pass http://127.0.0.1:8091;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
} location ^~ /filebim/ {
proxy_pass http://127.0.0.1:8091;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
} location /{
add_header Access-Control-Allow-Origin $http_origin;
add_header Access-Control-Allow-Credentials true;
add_header Access-Control-Allow-Headers DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type;
add_header Access-Control-Allow-Methods HEAD,GET,POST,PUT,DELETE,OPTIONS;
index index.jsp;
access_log logs/lgsjbim.shlingang.com.log bdip17bim-log;
proxy_pass http://127.0.0.1:8190;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
} server {
listen ;
server_name lmv.lgsjbim.shlingang.com;
#charset utf-;
default_type 'text/html';
charset utf-;
client_max_body_size 500M;
root E:/WEAVER/Tomcat/webapps; location ~* \.(gif|jpg|jpeg|png|css|js|ico|html|htm|swf|zip|rar|json|rvt|svf|f2d|pf|gz|bin|db|pack|bat|dds|sdb)$ {
if ($request_method = OPTIONS ) {
add_header Access-Control-Allow-Origin $http_origin;
add_header Access-Control-Allow-Methods "GET, OPTIONS";
add_header Access-Control-Allow-Headers "Authorization";
add_header Access-Control-Allow-Credentials "true";
add_header Content-Length ;
add_header Content-Type "text/plain;charset=utf-8"; return ;
}
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type always;
add_header Access-Control-Allow-Methods HEAD,GET,POST,PUT,DELETE,OPTIONS always;
access_log logs/static.lmv.lgsjbim.shlingang.com.log bdip17bim-log;
} location /{
index index.jsp;
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Credentials true always;
add_header Access-Control-Allow-Headers DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type always;
add_header Access-Control-Allow-Methods HEAD,GET,POST,PUT,DELETE,OPTIONS always;
access_log logs/lmv.lgsjbim.shlingang.com.log bdip17bim-log;
proxy_pass http://127.0.0.1:8191;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
} }

#user  nobody;worker_processes  4;
#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"';
    log_format main-log '[$request_time]$request|$msec|[$time_local]|$remote_addr|$http_x_forwarded_for|$http_user_agent|$request_body|$body_bytes_sent|$status';    log_format bdip17bim-log '[$request_time]$request|$msec|[$time_local]|$remote_addr|$http_x_forwarded_for|$http_user_agent|$request_body|$body_bytes_sent|$status';
    #access_log  logs/access.log  main-log;
    sendfile        on;    #tcp_nopush     on;
    #keepalive_timeout  0;    keepalive_timeout  65;    client_max_body_size 500M;    client_body_buffer_size 128k;
    client_header_buffer_size 8k;    large_client_header_buffers 4 8k;
    gzip  on;    gzip_buffers 4 16k;    #gzip_http_version 1.0;    gzip_comp_level 2;    gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;    gzip_vary off;    gzip_disable "MSIE [1-6]\.";
    proxy_connect_timeout 90;    proxy_send_timeout 90;    proxy_read_timeout 90;    proxy_buffer_size 4k;    proxy_buffers 32 4k;    proxy_busy_buffers_size 64k;
    server_names_hash_max_size 512;    server_names_hash_bucket_size 128;
        upstream modeltrans{        ip_hash;        server 127.0.0.1:10002 weight=10;    }
    upstream bimdata{        server 127.0.0.1:11001 weight=10;    }                server {        listen       8090;        server_name  192.168.0.66;        charset utf-8;
        # location ~* \.(gif|jpg|jpeg|png|css|ico|html|htm|flv|mp4)$ {        #     #access_log logs/static.lgsjbim.shlingang.com.log bdip17bim-log;        #     root E:/BDIP/ecology;        # }                location /static {            autoindex on;            if ($request_method = OPTIONS ) {                add_header Access-Control-Allow-Origin $http_origin;                add_header Access-Control-Allow-Methods "GET, OPTIONS";                add_header Access-Control-Allow-Headers "Authorization";                add_header Access-Control-Allow-Credentials "true";                add_header Content-Length 0;                add_header Content-Type "text/plain;charset=utf-8";                return 200;            }
            add_header Access-Control-Allow-Origin $http_origin;              add_header Access-Control-Allow-Credentials true;            add_header Access-Control-Allow-Headers DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type;            add_header Access-Control-Allow-Methods HEAD,GET,POST,PUT,DELETE,OPTIONS; 
            alias E:/BDIP/static.qiyeji.file/bdip-file/;            index index.html index.htm;        }
        location /lmv/static {            add_header Access-Control-Allow-Origin $http_origin;            add_header Access-Control-Allow-Credentials true;            add_header Access-Control-Allow-Headers DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type;            add_header Access-Control-Allow-Methods HEAD,GET,POST,PUT,DELETE,OPTIONS;            index  index.jsp;            access_log logs/static.lmv.lgsjbim.shlingang.com.log bdip17bim-log;            root E:/BDIP/apache-tomcat-7.0.75/webapps;        }
        location /lmv {            rewrite ^/lmv/(.*)$ /$1 last;            index  index.jsp;            add_header Access-Control-Allow-Origin $http_origin always;            add_header Access-Control-Allow-Credentials true always;            add_header Access-Control-Allow-Headers DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type always;            add_header Access-Control-Allow-Methods HEAD,GET,POST,PUT,DELETE,OPTIONS always;            access_log logs/lmv.lgsjbim.shlingang.com.log bdip17bim-log;            proxy_pass         http://127.0.0.1:8091;            proxy_set_header   Host             $http_host;            proxy_set_header   X-Real-IP        $remote_addr;            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;            proxy_set_header X-Forwarded-Proto $scheme;        }
        location /rest/ {            add_header Access-Control-Allow-Origin $http_origin;            add_header Access-Control-Allow-Credentials true;            add_header Access-Control-Allow-Headers DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type;            add_header Access-Control-Allow-Methods HEAD,GET,POST,PUT,DELETE,OPTIONS;            proxy_pass http://modeltrans;            proxy_set_header   Host             $http_host;            proxy_set_header   X-Real-IP        $remote_addr;            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;            proxy_set_header X-Forwarded-Proto $scheme;        }                location ^~ /4DAnalog/ {              proxy_pass http://127.0.0.1:8091;             proxy_set_header   Host             $http_host;            proxy_set_header   X-Real-IP        $remote_addr;            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;            proxy_set_header X-Forwarded-Proto $scheme;        }
        location ^~ /is/ {              proxy_pass http://127.0.0.1:8091;             proxy_set_header   Host    $http_host;             proxy_set_header   X-Real-IP   $remote_addr;             proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;            proxy_set_header X-Forwarded-Proto $scheme;         }                location ^~ /filebim/ {              proxy_pass http://127.0.0.1:8091;             proxy_set_header   Host    $http_host;             proxy_set_header   X-Real-IP   $remote_addr;             proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;            proxy_set_header X-Forwarded-Proto $scheme;         }                location /{                add_header Access-Control-Allow-Origin $http_origin;                add_header Access-Control-Allow-Credentials true;                add_header Access-Control-Allow-Headers DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type;                add_header Access-Control-Allow-Methods HEAD,GET,POST,PUT,DELETE,OPTIONS;                index  index.jsp;                access_log logs/lgsjbim.shlingang.com.log bdip17bim-log;                proxy_pass         http://127.0.0.1:8190;                proxy_set_header   Host             $http_host;                proxy_set_header   X-Real-IP        $remote_addr;                proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;                proxy_set_header X-Forwarded-Proto $scheme;        }    }

server {        listen       8003;        server_name  lmv.lgsjbim.shlingang.com;        #charset utf-8;        default_type 'text/html';        charset utf-8;        client_max_body_size 500M;        root E:/WEAVER/Tomcat/webapps;
        location ~* \.(gif|jpg|jpeg|png|css|js|ico|html|htm|swf|zip|rar|json|rvt|svf|f2d|pf|gz|bin|db|pack|bat|dds|sdb)$ {            if ($request_method = OPTIONS ) {                add_header Access-Control-Allow-Origin $http_origin;                add_header Access-Control-Allow-Methods "GET, OPTIONS";                add_header Access-Control-Allow-Headers "Authorization";                add_header Access-Control-Allow-Credentials "true";                add_header Content-Length 0;                add_header Content-Type "text/plain;charset=utf-8";                                return 200;            }            add_header Access-Control-Allow-Origin $http_origin always;            add_header Access-Control-Allow-Credentials true always;            add_header Access-Control-Allow-Headers DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type always;            add_header Access-Control-Allow-Methods HEAD,GET,POST,PUT,DELETE,OPTIONS always;            access_log logs/static.lmv.lgsjbim.shlingang.com.log bdip17bim-log;        }
        location /{            index  index.jsp;            add_header Access-Control-Allow-Origin $http_origin always;            add_header Access-Control-Allow-Credentials true always;            add_header Access-Control-Allow-Headers DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type always;            add_header Access-Control-Allow-Methods HEAD,GET,POST,PUT,DELETE,OPTIONS always;            access_log logs/lmv.lgsjbim.shlingang.com.log bdip17bim-log;            proxy_pass         http://127.0.0.1:8191;            proxy_set_header   Host             $http_host;            proxy_set_header   X-Real-IP        $remote_addr;            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;            proxy_set_header X-Forwarded-Proto $scheme;        }    }    }

ngnix 参考配置的更多相关文章

  1. 在Ngnix中配置支持Websocket

    使用SignalR实现Websocket实时数据传输时,前后端各自实现编码后,无法将Websocket调试通过.沮丧之时,负责配置网络代理的同事说,网络访问这块使用了Ngnix代理设置,可能是造成We ...

  2. 配置_DruidDataSource参考配置

    配置_DruidDataSource参考配置 <!-- 数据库驱动 --> <property name="driverClassName" value=&quo ...

  3. Druid参考配置

    pom中的maven dependency <dependency>            <groupId>com.alibaba</groupId>       ...

  4. Druid学习---配置_DruidDataSource参考配置

    [更多参考]https://www.cnblogs.com/niejunlei/p/5977895.html 配置_DruidDataSource参考配置 以下是一个参考的连接池配置: <bea ...

  5. renren-fast后端源码参考-配置和对应工具

    1. renren-fast后端源码参考-配置和对应工具 1.1. 前言 renren-fast是个开源的前后端分离快速开放平台,没有自己框架的同学可以直接使用它的,而我打算浏览一遍它的代码,提取一些 ...

  6. windows下ngnix+php配置

    1.需要工具: 下载ngnix  网址:http://nginx.org/ 下载:RunHiddenConsole 第二步 将下载文件解压后,将RunHiddenConsole拷贝到ngnix目录与p ...

  7. nginx与apache的参考配置

    nginx与apache是两大最主流的服务器,功能强大,但配置起来也比较麻烦,对于初学者来讲可能有些地方并不完全清楚其作用,这里搜集了一些配置的作用及其使用方法.其中nginx提供了推荐配置,而apa ...

  8. Druid 配置_DruidDataSource参考配置

    以下是一个参考的连接池配置: <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource ...

  9. ngnix入门配置

    文件1.首先到ngnix下载页面下载你操作系统对应的ngnix压缩包    http://nginx.org/en/download.html 博主我是window10操作系统  上面是我解压之后放的 ...

随机推荐

  1. yum安装openresty

    在群里看到春哥发的,先记录下来.一切都以官网为准,以后安装部署生态会越来越完善的. OpenResty 官方现在开始维护自己的打包虚机集合了,新的 linux 包仓库正在陆续登陆 openresty. ...

  2. 学习Flash 3D图形图像知识的网络资源集合

    1. 华中科技大学计算机学院开放式课程--计算机图形学 http://cs.hust.edu.cn/webroot/courses/csgraphics/index.php 2.深入Stage3D_7 ...

  3. 最近公共祖先LCA Tarjan 离线算法

    [简介] 解决LCA问题的Tarjan算法利用并查集在一次DFS(深度优先遍历)中完成所有询问.换句话说,要所有询问都读入后才开始计算,所以是一种离线的算法. [原理] 先来看这样一个性质:当两个节点 ...

  4. Java中使用HttpRequest调用RESTfull的DELETE方法接口提示:How to fix HTTP method DELETE doesn't support output

    说明:无论是Spring框架还是Spring Boot的Feign形式的客户端,以下的解决方法都适用. 解决方法:直接升级JDK 1.8,这个问题是1.7的BUG. 参考: https://sales ...

  5. python 人工智论

    https://www.zhihu.com/question/21395276 基于python深度学习库DeepPy的实现:GitHub - andersbll/neural_artistic_st ...

  6. ife2015-task2-javascript-util.js

    util.js/** * Created by Administrator on 2016/12/14. *///判断是否为数组function isArray(arr){ return (arr i ...

  7. numpy中结构数组

    在c语言中,我们可以使用关键字struct定义结构类型.和c语言一样,numpy也可以创建结构定义,这样可以很方便的读取二进制的C语言结构数组,将其转换为numpy数组对象,假设我们定义的结构数组如下 ...

  8. vue axios跨域请求,apache服务器设置

    问题所在axios请求会发送两次请求 也就是说,它会先使用options去测试,你这个接口是否能够正常通讯,如果不能就不会发送真正的请求过来,如果测试通讯正常,则开始正常请求. 思路: 跨域--> ...

  9. 彻底解决DZ大附件上传问题

    个. 注意:很多人遇到修改php.ini后重应WEB服务后仍然不能生效.这种情况应该先确认一下所改的php.ini是不是当前PHP所使用的.您可以在WEB目录下建立一个php文件,内容很简单就一句话& ...

  10. python开发微信支付学习记录(转)

    前言 微信支付是由微信及财付通联合推出的移动支付创新产品.如今,随着微信支付的全面开放,相关需求也越来越多,很多开发人员进行微信支付开发及商家申请微信支付时,面临着诸多疑惑. 要想开发顺利进行,首先要 ...