#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;
 upstream tomcat_server { 
         server 192.144.1**:8082 weight=1;
  server 192.1***:8083 weight=1;  
       }

server {
        listen       80;
        server_name  192.144.1***;

#charset koi8-r;

#access_log  logs/host.access.log  main;

location / {
  proxy_pass http://tomcat_server;
            root   C:\BaiduNetdiskDownload\nginx-1.10.2\nginx-1.10\html;
            index  index.html index.htm *.jsp *.html;
        }
  
  #location ~ \.jsp$ { 
         # proxy_pass http://192.144.1***:8082;
  # proxy_pass http://192.144.1**:8083; 
      #  } 
    
 # location ~ \.(html|js|css|png|gif)$ { 
  # root C:\BaiduNetdiskDownload\tomcat\webapps;
    # root C:\BaiduNetdiskDownload\apache-tomcat-7.0.69\webapps;
          #}
  
  
        #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   C:\BaiduNetdiskDownload\nginx-1.10.2\nginx-1.10.2\html;
        }

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://192.144.1**;
        #}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        #location ~ \.php$ {
        #    root           html;
        #    fastcgi_pass   192.144.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       80;
     #   server_name  192.144.1**;;

#  location / {
       #     root   html;
       #     index  index.html index.htm *.html *.jsp index.jsp;
      #  }
   # }

# HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  192.144.1**;

#    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 *.html *.jsp;
    #    }
    #}

}

nginx最新配置的更多相关文章

  1. spring4+websocket+nginx详细配置

    实现的版本jdk1.7.0_25, tomcat7.0.47.0, Tengine/2.1.1 (nginx/1.6.2), servlet3.0, spring4.2.2 使用maven导入版本3. ...

  2. nginx缓存配置的操作记录梳理

    web缓存位于内容源Web服务器和客户端之间,当用户访问一个URL时,Web缓存服务器会去后端Web源服务器取回要输出的内容,然后,当下一个请求到来时,如果访问的是相同的URL,Web缓存服务器直接输 ...

  3. nginx+tomcat 配置负载均衡

    nginx 从Nginx官网下载页面(http://nginx.org/en/download.html)下载Nginx最新版本(我用的是nginx-1.8.1版本) 安装就直接把压缩包解压到一个路径 ...

  4. nginx的配置总结

    总体而言,nginx的配置比起apache来是要简洁很多,而言容易理解得多的,另外官网的文档也十分的简洁易懂.我们先看一个简化版的配置文件nginx.conf: #user nobody; worke ...

  5. nginx的配置与安装

    说说在Linux系统下安装配置Nginx的详细过程. 1. 从Nginx官网下载Nginx.目前最新的稳定版为:1.6.2. 2. 将下载下来的Nginx上传到/opt/nginx目录下.运行“tar ...

  6. 【第六课】Nginx常用配置下详解

    目录 Nginx常用配置下详解 1.Nginx虚拟主机 2.部署wordpress开源博客 3.部署discuz开源论坛 4.域名重定向 5.Nginx用户认证 6.Nginx访问日志配置 7.Ngi ...

  7. nginx动态配置及服务发现那些事

    Reference: http://xiaorui.cc/2016/10/16/nginx%E5%8A%A8%E6%80%81%E9%85%8D%E7%BD%AE%E5%8F%8A%E6%9C%8D% ...

  8. Nginx在windows上安装 及 Nginx的配置及优化

    https://www.cnblogs.com/Chiler/p/8027167.html http://www.runoob.com/linux/nginx-install-setup.html 前 ...

  9. Nginx+Keepalived配置

    1. Nginx安装 (1) 环境:分别在2台服务器上部署nginx且步骤一致: 如192.138.86.1和192.138.86.2 (2) 下载官网最新稳定版,地址:https://nginx.o ...

随机推荐

  1. POJ 2251 Dungeon Master【BFS】

    题意:给出一个三维坐标的牢,给出起点st,给出终点en,问能够在多少秒内逃出. 学习的第一题三维的广搜@_@ 过程和二维的一样,只是搜索方向可以有6个方向(x,y,z的正半轴,负半轴) 另外这一题的输 ...

  2. Display Video

    ###chromium webrtc视频显示 ###两个数据源:本地数据源: MediaStreamRemoteVideoSource(content/renderer/media/webrtc/me ...

  3. Ubuntu 18.04 安装 Broadcom Limited BCM43142无线网卡驱动

    系统默认没有集成 BCM43142无线网卡驱动可以通过下面的方法安装--------------------------------------------------------------root ...

  4. webpack简短版零工程构建项目(二)

    webpack使用总结 1.初始化一个项目 npm init -y 之后会生成一个package.json配置文件. 2.安装webpack,vue,vue-loader npm install we ...

  5. 分享一个简单好用的ipv6正则表达式

    网上找了好几个,都不太好使.比较严谨的又运行缓慢,而且文本中多处含ipv6的时候,又提取不出全部的ipv6. 故分享一个不太严谨效率又高的ipv6正则表达式: ([a-f0-9]{1,4}(:[a-f ...

  6. javascript实现多线程 Concurrent.Thread.js

    在这次我的项目中,因为前端要检测硬件加载并识别,再向后台请求发送数据,然后再返回的相应的配置文件!在这过程,要好时好几秒钟,严重影响体验效果,所以在网上靠看的方案,运用多线程去处理,这效果明显改善! ...

  7. java 线程传参 方式

    第一类:主动向线程传参   public class ThreadTest extends Thread { public ThreadTest() { } /** * 第一种通过构造方法来传递参数 ...

  8. 【J-meter】正则表达式提取

    当获取的值中含有折行,可采用下面的办法解决:

  9. Java基础学习总结(29)——浅谈Java中的Set、List、Map的区别

    就学习经验,浅谈Java中的Set,List,Map的区别,对JAVA的集合的理解是想对于数组: 数组是大小固定的,并且同一个数组只能存放类型一样的数据(基本类型/引用类型),JAVA集合可以存储和操 ...

  10. 概率编程语言(Probabilistic Programming Languages)库 —— edward

    注意:tensorflow api 在 1.1.0 以后迎来重大变化,edward 的稳定版依赖于 tensorflow 1.1.0. edward是一个支持概率建模.推断的 Python 第三方库, ...