以下信息仅针对Redstone的Ngxin配置文件进行更新。

web服务器Nginx配置文件结构如下:

/etc/nginx/nginx.conf

# For more information on configuration, see:
#   * Official English Documentation: http://nginx.org/en/docs/
#   * Official Russian Documentation: http://nginx.org/ru/docs/

user nginx;
#worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

#自定义设置
worker_processes 8;
worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000;

events {
    use epoll;
    worker_connections 2056;
}

http {
    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  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;

    server {
        listen       80 default_server;
        listen       [::]:80 default_server;
        server_name  _;
        root         /usr/share/nginx/html;

        # Load configuration files for the default server block.
        #include /etc/nginx/default.d/*.conf;

        location / {
        }

        error_page 404 /404.html;
            location = /40x.html {
        }

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }
}

----

/etc/nginx/conf.d/cloud_ota.conf(云观象台配置文件)

server {
    listen       8010;
    listen       8610;
    server_name  fota.redstone.net.cn;

    set $path "/home/www/cloud_ota";

    #加载默认配置
    include /etc/nginx/default.d/*.conf;
}

----

/etc/nginx/conf.d/bigdata.conf(大数据配置文件)

server {
    listen       8020;
    listen       8620;
    server_name  bigdata.redstone.net.cn;

    set $path "/home/www/bigdata";

    #加载默认配置
    include /etc/nginx/default.d/*.conf;
}

----

/etc/nginx/conf.d/konka.conf(康佳配置文件)

client_max_body_size 2000m;
server {
    listen       80;
    listen       8030;
    server_name  konka.ota.redstone.net.cn;

    set $path "/home/www/rs_detection";

    #加载默认配置
    include /etc/nginx/default.d/*.conf;
}

----

/etc/nginx/default.d/default.conf

location / {
    root   $path;
    index  index.html index.htm index.php; 

    #client_max_body_size 30m;

    if (!-e $request_filename)
    {
        rewrite ^/(.*)$ /index.php/$1 last;
        break;
    }

}

#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$ {
location ~ .*\.(php|php5)/?.*$ {
    root           $path;
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;

    client_max_body_size 1024m;

    #定义变量 $path_info ,用于存放pathinfo信息
    set $path_info "";
    #定义变量 $real_script_name,用于存放真实地址
    set $real_script_name $fastcgi_script_name;
    #如果地址与引号内的正则表达式匹配
    if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
            #将文件地址赋值给变量 $real_script_name
            set $real_script_name $1;
            #将文件地址后的参数赋值给变量 $path_info
            set $path_info $2;
    }
    fastcgi_param SCRIPT_NAME $real_script_name;
    fastcgi_param PATH_INFO $path_info;

    #fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
    fastcgi_param  SCRIPT_FILENAME  $document_root$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;
#}

#禁止浏览器下载有此后缀名的文件
location ~* \.(ini|txt|log)$ {
     deny all;
}

-------------------------------------------------------------------------

反向代理服务器Nginx配置文件结构如下:

/etc/nginx/nginx.conf

# For more information on configuration, see:
#   * Official English Documentation: http://nginx.org/en/docs/
#   * Official Russian Documentation: http://nginx.org/ru/docs/

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

events {
    worker_connections 1024;
}

http {
    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  /var/log/nginx/access.log  main;

    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   65;
    types_hash_max_size 2048;

    include             /etc/nginx/mime.types;
    default_type        application/octet-stream;

    # Load modular configuration files from the /etc/nginx/conf.d directory.
    # See http://nginx.org/en/docs/ngx_core_module.html#include
    # for more information.
    include /etc/nginx/conf.d/*.conf;

    server {
        listen       80 default_server;
        listen       [::]:80 default_server;
        server_name  _;
        rewrite ^(.*) http://www.redstone.net.cn ;#permanent
    }
}

----  

/etc/nginx/conf.d/cloud_ota.conf(云观象台配置文件)

upstream servers_cloud_ota   {
     server 114.215.180.137:8010;
     server 114.215.178.111:8010 backup;
}
upstream servers_cloud_ota_api   {
     server 114.215.180.137:8610;
     server 114.215.178.111:8610 backup;
}

server {
    listen       80;
    server_name  fota.redstone.net.cn;

    location / {

        proxy_set_header Host $host;
        proxy_set_header X-Real-Ip $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
	proxy_next_upstream error timeout invalid_header http_500 http_503 http_404;
        proxy_pass  http://servers_cloud_ota;

    }
}

server {
    listen       6100;
    server_name  fota.redstone.net.cn;

    location / {

        proxy_set_header Host $host;
        proxy_set_header X-Real-Ip $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
	proxy_next_upstream error timeout invalid_header http_500 http_503 http_404;
        proxy_pass  http://servers_cloud_ota_api;

    }

}

----

/etc/nginx/conf.d/bigdata.conf(大数据配置文件)

upstream servers_bigdata   {
     server 114.215.180.137:8020;
     server 114.215.178.111:8020 backup;
}
upstream servers_bigdata_api   {
     server 114.215.180.137:8620;
     server 114.215.178.111:8620 backup;
}

server {
    listen       80;
    server_name  bigdata.redstone.net.cn;

    location / {

        proxy_set_header Host $host;
        proxy_set_header X-Real-Ip $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_pass  http://servers_bigdata;

    }
}

server {
    listen       6100;
    server_name  bigdata.redstone.net.cn;

    location / {

        proxy_set_header Host $host;
        proxy_set_header X-Real-Ip $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_pass  http://servers_bigdata_api;

    }

}

----

/etc/nginx/conf.d/konka.conf(康佳配置文件)

upstream servers_konka   {
     server 114.215.180.137:8030;
     server 114.215.178.111:8030 backup;
}

server {
    listen       80;
    server_name  konka.ota.redstone.net.cn;

    location / {

        proxy_set_header Host $host;
        proxy_set_header X-Real-Ip $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_pass  http://servers_konka;

    }
}

Redstone 云观象台 服务器部署 - Nginx配置文件的更多相关文章

  1. thinkphp项目阿里云ECS服务器部署

    [日记]thinkphp项目阿里云ECS服务器部署   项目本地开发告一段落.准备上传到服务器上测试 技术组成 thinkphp+mysql+阿里ECS  代码管理方式git 一.阿里ECS服务器配置 ...

  2. 阿里云ECS服务器部署HADOOP集群(一):Hadoop完全分布式集群环境搭建

    准备: 两台配置CentOS 7.3的阿里云ECS服务器: hadoop-2.7.3.tar.gz安装包: jdk-8u77-linux-x64.tar.gz安装包: hostname及IP的配置: ...

  3. 阿里云ECS服务器部署HADOOP集群(二):HBase完全分布式集群搭建(使用外置ZooKeeper)

    本篇将在阿里云ECS服务器部署HADOOP集群(一):Hadoop完全分布式集群环境搭建的基础上搭建,多添加了一个 datanode 节点 . 1 节点环境介绍: 1.1 环境介绍: 服务器:三台阿里 ...

  4. 阿里云ECS服务器部署HADOOP集群(三):ZooKeeper 完全分布式集群搭建

    本篇将在阿里云ECS服务器部署HADOOP集群(一):Hadoop完全分布式集群环境搭建的基础上搭建,多添加了一个 datanode 节点 . 1 节点环境介绍: 1.1 环境介绍: 服务器:三台阿里 ...

  5. 阿里云ECS服务器部署HADOOP集群(六):Flume 安装

    本篇将在阿里云ECS服务器部署HADOOP集群(一):Hadoop完全分布式集群环境搭建的基础上搭建. 1 环境介绍 一台阿里云ECS服务器:master 操作系统:CentOS 7.3 Hadoop ...

  6. 阿里云ECS服务器部署HADOOP集群(七):Sqoop 安装

    本篇将在 阿里云ECS服务器部署HADOOP集群(一):Hadoop完全分布式集群环境搭建 阿里云ECS服务器部署HADOOP集群(二):HBase完全分布式集群搭建(使用外置ZooKeeper) 阿 ...

  7. 阿里云ECS服务器部署HADOOP集群(五):Pig 安装

    本篇将在阿里云ECS服务器部署HADOOP集群(一):Hadoop完全分布式集群环境搭建的基础上搭建. 1 环境介绍 一台阿里云ECS服务器:master 操作系统:CentOS 7.3 Hadoop ...

  8. 阿里云ECS服务器部署HADOOP集群(四):Hive本地模式的安装

    本篇将在阿里云ECS服务器部署HADOOP集群(一):Hadoop完全分布式集群环境搭建的基础上搭建. 本地模式需要采用MySQL数据库存储数据. 1 环境介绍 一台阿里云ECS服务器:master ...

  9. 阿里云ECS服务器部署Node.js项目全过程详解

    本文详细介绍如何部署NodeJS项目到阿里云ECS上,以及本人在部署过程中所遇到的问题.坑点和解决办法,可以说是全网最全最详细的教程了.同时讲解了如何申请阿里云免费SSL证书,以及一台ECS服务器配置 ...

随机推荐

  1. 缓存应用--Memcached分布式缓存简介

    一.   什么是Memcached Memcached 是一个高性能的分布式内存 对象缓存系统,用于动态Web应用以减轻数据库负载.它通过在内存中缓存数据和对象 来减少读取数据库的次数,从而提供动态. ...

  2. JS 学习笔记--5---对象和数组

    1.Object类型(引用类型) 不具备多少功能,但是对于在ECMAScript中存储和传递数据确实,确是很理想的选择. 创建方式:(1).使用new Object();方式创建对象,然后对对象进行设 ...

  3. Matlab绘制透明平面(二元函数)

    一.需求来源 对空间结构聚类,恰好是圆台,找到了上下底面的方程,所以画图. 二.需求解决 2.1 绘制平面 x = linspace(0,5,100); y = linspace(0,4,100); ...

  4. NGUI无法按住鼠标按住时无法监听OnHover事件

    UICamera.cs 修改前: if ((!isPressed) && highlightChanged) { currentScheme = ControlScheme.Mouse ...

  5. Sqli-labs less 55

    Less-55 本关的sql语句为: $sql="SELECT * FROM security.users WHERE id=($id) LIMIT 0,1"; 其余和less54 ...

  6. String、StringBuilder

    public class testString{ public static void main(String[] args) { String a="cool"; String ...

  7. MariaDB Galera Cluster集群

    一.MariaDB Galera Cluster概要: 1.简述: MariaDB Galera Cluster 是一套在mysql innodb存储引擎上面实现multi-master及数据实时同步 ...

  8. 微信公众号token的asp.net脚本

    老板让我搞一个微信公众号.好吧.前面都很EZ,直到要使用一个token验证服务器的有效性. 看了下文档,大概意思就是微信的服务器用GET请求访问你的服务器. 其中包含了signature,nonce, ...

  9. HDU4784 Dinner Coming Soon(dp)

    当时区域赛的一道题.题意大概是这样的,有一个1~N的图,然后你要从1->N,其中每经过一条边需要消耗你的时间和金钱,每到一个地方可以选择什么都不做,或者买一包盐,卖一包盐,身上不能同时有超过B包 ...

  10. iOS视频压缩

    // // ViewController.m // iOS视频测试 // // Created by apple on 15/8/19. // Copyright (c) 2015年 tqh. All ...