Redstone 云观象台 服务器部署 - Nginx配置文件
以下信息仅针对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配置文件的更多相关文章
- thinkphp项目阿里云ECS服务器部署
[日记]thinkphp项目阿里云ECS服务器部署 项目本地开发告一段落.准备上传到服务器上测试 技术组成 thinkphp+mysql+阿里ECS 代码管理方式git 一.阿里ECS服务器配置 ...
- 阿里云ECS服务器部署HADOOP集群(一):Hadoop完全分布式集群环境搭建
准备: 两台配置CentOS 7.3的阿里云ECS服务器: hadoop-2.7.3.tar.gz安装包: jdk-8u77-linux-x64.tar.gz安装包: hostname及IP的配置: ...
- 阿里云ECS服务器部署HADOOP集群(二):HBase完全分布式集群搭建(使用外置ZooKeeper)
本篇将在阿里云ECS服务器部署HADOOP集群(一):Hadoop完全分布式集群环境搭建的基础上搭建,多添加了一个 datanode 节点 . 1 节点环境介绍: 1.1 环境介绍: 服务器:三台阿里 ...
- 阿里云ECS服务器部署HADOOP集群(三):ZooKeeper 完全分布式集群搭建
本篇将在阿里云ECS服务器部署HADOOP集群(一):Hadoop完全分布式集群环境搭建的基础上搭建,多添加了一个 datanode 节点 . 1 节点环境介绍: 1.1 环境介绍: 服务器:三台阿里 ...
- 阿里云ECS服务器部署HADOOP集群(六):Flume 安装
本篇将在阿里云ECS服务器部署HADOOP集群(一):Hadoop完全分布式集群环境搭建的基础上搭建. 1 环境介绍 一台阿里云ECS服务器:master 操作系统:CentOS 7.3 Hadoop ...
- 阿里云ECS服务器部署HADOOP集群(七):Sqoop 安装
本篇将在 阿里云ECS服务器部署HADOOP集群(一):Hadoop完全分布式集群环境搭建 阿里云ECS服务器部署HADOOP集群(二):HBase完全分布式集群搭建(使用外置ZooKeeper) 阿 ...
- 阿里云ECS服务器部署HADOOP集群(五):Pig 安装
本篇将在阿里云ECS服务器部署HADOOP集群(一):Hadoop完全分布式集群环境搭建的基础上搭建. 1 环境介绍 一台阿里云ECS服务器:master 操作系统:CentOS 7.3 Hadoop ...
- 阿里云ECS服务器部署HADOOP集群(四):Hive本地模式的安装
本篇将在阿里云ECS服务器部署HADOOP集群(一):Hadoop完全分布式集群环境搭建的基础上搭建. 本地模式需要采用MySQL数据库存储数据. 1 环境介绍 一台阿里云ECS服务器:master ...
- 阿里云ECS服务器部署Node.js项目全过程详解
本文详细介绍如何部署NodeJS项目到阿里云ECS上,以及本人在部署过程中所遇到的问题.坑点和解决办法,可以说是全网最全最详细的教程了.同时讲解了如何申请阿里云免费SSL证书,以及一台ECS服务器配置 ...
随机推荐
- Leetcode#139 Word Break
原题地址 与Word Break II(参见这篇文章)相比,只需要判断是否可行,不需要构造解,简单一些. 依然是动态规划. 代码: bool wordBreak(string s, unordered ...
- SOA之(1)——SOA架构基础概念
在深入探讨什么是面向服务的架构(SOA)之前,先建立一些基本的概念和术语的基本描述而非严格定义,所以也许有些定义在业内还存留争议,此处暂且忽略. 架构基础 技术架构(Technology Archit ...
- Sqli-labs less 30
Less-30 Less-30与less-29原理是一致的,我们可以看到less-30的sql语句为: 所以payload为: http://127.0.0.1:8080/sqli-labs/Less ...
- 你必须知道的ADO.NET
原文:http://www.cnblogs.com/liuhaorain/archive/2012/02/06/2340409.html 1. 什么是ADO.NET? 简单的讲,ADO.NET是一组允 ...
- Python中编码问题?
一.键盘输入 raw_input('请输入:'.decode('utf-8').encode('gbk'))raw_input(unicode('请输入:','utf-8').encode('gbk' ...
- Runtime的用法
public class RuntimeTest { public static void main(String[] args) { Runtime run =Runtime.getRuntime( ...
- 【leetcode】Contains Duplicate & Rectangle Area(easy)
Contains Duplicate Given an array of integers, find if the array contains any duplicates. Your funct ...
- swift-网络请求
跟着网上大神写了个,还有待提高啊:http://pan.baidu.com/s/1sjC5Pl7
- POJ 2001
#include<iostream> using namespace std; ; struct trienode { trienode * next[kind]; int branch; ...
- DevExpress Form那些事儿
1:设置子窗体依附父窗体 首先将父窗体的属性中 IsMdiContainer 设置为 True , 就是将窗体设置为 MDI窗体.子窗体和父窗体都是继承自RibbonForm的. 代码如下 : ...