The following information is only updated for Redstone's ngxin configuration file.
The Web server nginx configuration file structure is as follows:
/etc/nginx/nginx.conf
# For more information on configuration, see:# * Official 中文版 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 _by Tes_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 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 502 503 504/50x.html; Location =/50x.html {}}}
----
/etc/nginx/conf.d/cloud_ota.conf (Cloud Observatory config file)
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 (Big Data configuration file)
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 (Konka configuration file)
Client_max_body_size 2000m;server { listen ; 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;#}# pas s 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 for storing pathinfo information set $path _info ""; #定义变量 $real _script_name for storing the real address set $real _script_name $fastcgi _script_name; #如果地址与引号内的正则表达式匹配 if ($fastcgi _script_name ~ "^ (. +?\.php) (/.+) $") {#将文件地址赋值给变量 $real _script_name Set $real _script_name $; #将文件地址后的参数赋值给变量 $path _info set $path _info; } 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;}
-------------------------------------------------------------------------
The reverse proxy server Nginx configuration file structure is as follows:
/etc/nginx/nginx.conf
# For more information on configuration, see:# * Official 中文版 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 ;p id/run/nginx.pid;events {worker_connections 1024;} HTTP {log_format main ' $remote _addr-$remote _user [$time _local] "$request" ' $status $body _by Tes_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 default_server; Listen [::]:80 default_server; server_name _; Rewrite ^ (. *) http://www.redstone.net.cn; #permanent}}
----
/etc/nginx/conf.d/cloud_ota.conf (Cloud Observatory config file)
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 ; 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 (Big Data configuration file)
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 ; 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 (Konka configuration file)
Upstream Servers_konka { server 114.215.180.137:8030; Server 114.215.178.111:8030 Backup;} server { listen ; 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 Cloud Observatory Server Deployment-nginx configuration file