其他大神的配置 nginx 配置參考

2019獨角獸企業重金招聘Python工程師標準>>> hot3.png

`

user nginx nginx; worker_processes 2;

#error_log logs/error.log; error_log logs/error.log notice; #error_log logs/error.log info;

pid logs/nginx.pid; google_perftools_profiles /tmp/tcmalloc; worker_rlimit_nofile 65535;

events { worker_connections 65535; use epoll; }

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" "$request_time" "$request_body"';#access_log  logs/access.log  main;sendfile        on;
tcp_nopush      on;
tcp_nodelay     on;
server_tokens   off;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 30m;
client_body_buffer_size 1024k;#keepalive_timeout  0;
keepalive_timeout  65;
geoip_country /setup/nginx/conf/GeoIP.dat;
proxy_connect_timeout   60;
proxy_send_timeout      60;
proxy_read_timeout      60;
proxy_buffer_size       256k;
proxy_buffers           8 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;

fastcgi_connect_timeout 300;

fastcgi_send_timeout 300;

fastcgi_read_timeout 300;

fastcgi_buffer_size 64k;

fastcgi_buffers 4 64k;

fastcgi_busy_buffers_size 128k;

fastcgi_temp_file_write_size 128k;

 gzip on;gzip_min_length  5k;gzip_buffers     16 8k;gzip_http_version 1.1;gzip_comp_level 6;gzip_types application/javascript text/plain text/css text/js application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;gzip_vary on;gzip_proxied any; underscores_in_headers on;  upstream testd.skg.com {

server 10.24.167.199:8085 weight=100 max_fails=3 fail_timeout=30s; }

upstream testlogin.skg.com { server 10.24.167.199:8085 weight=100 max_fails=3 fail_timeout=30s; }

upstream testskg.skg.com { server 10.24.167.199:8085 weight=100 max_fails=3 fail_timeout=30s; }

upstream testo.skg.com { server 10.24.167.199:8089 weight=100 max_fails=3 fail_timeout=30s; }

upstream testwap.skg.com { server 10.24.167.199:8088 weight=100 max_fails=3 fail_timeout=30s; }

 server {listen       80;server_name  test.tatatoutiao.com;underscores_in_headers on;#charset koi8-r;access_log  logs/test.tatatoutiao.com.access.log  main;location / {index  index.html index.htm index.jsp;proxy_set_header Host $host;proxy_set_header X-Forward-For $remote_addr;proxy_set_header X-Real-IP $remote_addr;proxy_pass http://10.24.167.199:8080;}}         server {listen       80;server_name  testwap.tatatoutiao.com;#charset koi8-r;access_log  logs/testwap.tatatoutiao.com.access.log  main;#location  / {#    root /setup/nginx/tata;#   index  index.htm index.html;#  access_log off;#        }location / {index  index.html index.htm index.jsp;proxy_pass http://10.24.167.199:8080;proxy_set_header Host $host;proxy_set_header X-Forward-For $remote_addr;proxy_set_header X-Real-IP $remote_addr;}}

server { listen 80; server_name testapi.tatatoutiao.com ;

    #charset koi8-r;access_log  logs/testapi.tatatoutiao.com.access.log  main;location / {index  index.html index.htm index.jsp;proxy_pass http://10.24.167.199:8082;proxy_set_header Host $host;proxy_set_header X-Forward-For $remote_addr;proxy_set_header X-Real-IP $remote_addr;}}

server { listen 80; server_name testadmin.tatatoutiao.com;

    #charset koi8-r;access_log  logs/testadmin.tatatoutiao.com.access.log  main;location / {index  index.html index.htm index.jsp;proxy_pass http://10.24.167.199:8083;proxy_set_header Host $host;proxy_set_header X-Forward-For $remote_addr;proxy_set_header X-Real-IP $remote_addr;}}server {listen       80;server_name  lifetest.skg.com;underscores_in_headers on;#charset koi8-r;access_log  logs/lifetest.skg.com.access.log  main;location / {index  index.html index.htm index.jsp;proxy_set_header Host $host;proxy_set_header X-Forward-For $remote_addr;proxy_set_header X-Real-IP $remote_addr;proxy_pass http://10.24.167.199:8080;}}         server {listen       80;server_name  lifetestwap.skg.com;#charset koi8-r;access_log  logs/lifetestwap.skg.com.access.log  main;#location  / {#    root /setup/nginx/tata;#   index  index.htm index.html;#  access_log off;#        }location  /bbswx/ {index  index.html index.htm index.jsp;proxy_pass   http://10.24.167.199:8080;proxy_set_header Host $host;proxy_set_header X-Forward-For $remote_addr;proxy_set_header X-Real-IP $remote_addr;add_header From m.skg.com;proxy_cookie_path /bbswx/   /;proxy_set_header Cookie $http_cookie;}location  /styles/bbswx/ {index  index.html index.htm index.jsp; client_max_body_size    100m; proxy_pass   http://10.24.167.199:8080; proxy_set_header Host $host;         proxy_set_header X-Forward-For $remote_addr; proxy_set_header X-Real-IP $remote_addr; }location  /scripts/bbswx/ {index  index.html index.htm index.jsp; client_max_body_size    100m; proxy_pass   http://10.24.167.199:8080; proxy_set_header Host $host;         proxy_set_header X-Forward-For $remote_addr; proxy_set_header X-Real-IP $remote_addr; }location / {index  index.html index.htm index.jsp;proxy_pass http://10.24.167.199:8080;proxy_set_header Host $host;proxy_set_header X-Forward-For $remote_addr;proxy_set_header X-Real-IP $remote_addr;}}

server { listen 80; server_name lifetestapi.skg.com ;

    #charset koi8-r;access_log  logs/lifetestapi.skg.com.access.log  main;location / {index  index.html index.htm index.jsp;proxy_pass http://10.24.167.199:8082;proxy_set_header Host $host;proxy_set_header X-Forward-For $remote_addr;proxy_set_header X-Real-IP $remote_addr;}}

server { listen 80; server_name lifetestadmin.skg.com;

    #charset koi8-r;access_log  logs/lifetestadmin.skg.com.access.log  main;location / {index  index.html index.htm index.jsp;proxy_pass http://10.24.167.199:8083;proxy_set_header Host $host;proxy_set_header X-Forward-For $remote_addr;proxy_set_header X-Real-IP $remote_addr;}}server {listen       80;server_name testskg.skg.com; #charset koi8-r;if ( $request_uri ~* ^/index\.htm$ ){rewrite  ^/index\.htm$   http://testskg.skg.com permanent;}       #登錄頁面驗證碼從后端動態獲取location = /generateImage.html {proxy_pass http://testd.skg.com/generateImage.html;}#location ^~ /scripts/#  {#root /usr/local/nginx/html/;#access_log off;#   }#location ^~ /styles/#   {# root /usr/local/nginx/html/;# access_log off;#  }location = /category/ {root /usr/local/nginx/html/category;index  index.htm index.html category.html category.htm;access_log off;if  (!-e $request_filename) {proxy_pass   http://testskg.skg.com;}}location ~* \.(css|js)${root /usr/local/nginx/html/;access_log off;expires 1h;}location / {root /usr/local/nginx/html; index  index.htm index.html;if  (!-e $request_filename) {proxy_pass   http://testskg.skg.com;}}location /storefront/member/toLogin.html {rewrite . https://testlogin.skg.com/storefront/member/toLogin.html;}}#   location / {#     root   html;#     index  index.html index.htm index.jsp;#     client_max_body_size    100m;#     proxy_pass   http://testskg.skg.com;#     proxy_set_header Host $host;	#     proxy_set_header X-Forward-For $remote_addr;#     proxy_set_header X-Real-IP $remote_addr;#             }# }server {listen       80;server_name testwap.skg.com ; #charset koi8-r;#access_log  logs/host.access.log  main;#rewrite "^/product\/([0-9]{15}).htm/?$" http://testwap.skg.com/product/$1.html permanent;  
#rewrite "^/category\/([a-z-A-Z]+)_([a-z-A-Z]+).htm/?$" http://testwap.skg.com/category/$1_$2.html permanent;location  /bbswx/ {#root   html;#  index  index.html index.htm index.jsp;#  client_max_body_size    100m;#  proxy_pass   http://10.24.167.199:8080;#proxy_cookie_path /bbswx/ /;#proxy_set_header Cookie $http_cookie;#  proxy_set_header Host $host;	#  proxy_set_header X-Forward-For $remote_addr;# proxy_set_header X-Real-IP $remote_addr;if ($host ~* testwap.skg.com) {rewrite ^/(.*)$ http://lifetestwap.skg.com/$1 permanent;}}location  /styles/bbswx/ { #root   html; # index  index.html index.htm index.jsp; # client_max_body_size    100m; # proxy_pass   http://10.24.167.199:8080; # proxy_set_header Host $host;         # proxy_set_header X-Forward-For $remote_addr; # proxy_set_header X-Real-IP $remote_addr; if ($host ~* testwap.skg.com) {rewrite ^/(.*)$ http://lifetestwap.skg.com/$1 permanent;}} location  /scripts/bbswx/ { #root   html; #index  index.html index.htm index.jsp; #client_max_body_size    100m; #proxy_pass   http://10.24.167.199:8080; #proxy_set_header Host $host;         #proxy_set_header X-Forward-For $remote_addr; #proxy_set_header X-Real-IP $remote_addr; if ($host ~* testwap.skg.com) {rewrite ^/(.*)$ http://lifetestwap.skg.com/$1 permanent;}}location /shopfront/ec/pay/ {index  index.html index.htm index.jsp;proxy_pass   http://10.24.167.199:8089;proxy_set_header Host $host;proxy_set_header X-Forward-For $remote_addr;proxy_set_header X-Real-IP $remote_addr;add_header From testwap.skg.com;proxy_cookie_path /shopfront/ec/pay/  /;proxy_set_header Cookie $http_cookie;}location  / {#root   html;index  index.html index.htm index.jsp;client_max_body_size    100m;proxy_pass   http://10.24.167.199:8088;proxy_set_header Host $host;proxy_set_header X-Forward-For $remote_addr;proxy_set_header X-Real-IP $remote_addr;}}server {#listen       8000;listen       80;server_name  testapi.skg.com;
access_log logs/testapi.skg.com.access.log main;location / {#root   html;#index  index.html index.htm;proxy_pass   http://10.24.167.199:8086;proxy_set_header Host $host;proxy_set_header X-Forward-For $remote_addr;proxy_set_header X-Real-IP $remote_addr;client_max_body_size    1000m;}}server {listen       80;server_name testadmin.skg.com;#charset koi8-r;#access_log  logs/host.access.log  main;location / {#root   html;index  index.html index.htm index.jsp;#client_max_body_size    100m;proxy_pass   http://10.24.167.199:8087;proxy_set_header Host $host;proxy_set_header X-Forward-For $remote_addr;proxy_set_header X-Real-IP $remote_addr;}}server {listen       443;server_name testadmin.skg.com;#charset koi8-r;#access_log  logs/host.access.log  main;ssl on;ssl_certificate /usr/local/key/server.cer;ssl_certificate_key /usr/local/key/server2.key;ssl_session_timeout 5m;#access_log /var/log/nginx/access.log;#error_log /var/log/nginx/error.log;ssl_protocols SSLv2 SSLv3 TLSv1;ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLV2:+EXP;ssl_prefer_server_ciphers on; location / {#root   html;index  index.html index.htm index.jsp;#client_max_body_size    100m;proxy_pass   http://10.24.167.199:8087;proxy_set_header Host $host;proxy_set_header X-Forward-For $remote_addr;proxy_set_header X-Real-IP $remote_addr;}}server {listen         80;server_name testd.skg.com;location = /generateImage.html {proxy_pass http://testd.skg.com/generateImage.html;}location /storefront/member/toLogin.html {rewrite . https://testlogin.skg.com/storefront/member/toLogin.html;}location /storefront/member/checkLogin.html{proxy_pass http://testd.skg.com/storefront/member/checkLogin.html;}location /storefront/member/cookieLogin.html{proxy_pass http://testd.skg.com/storefront/member/checkLogin.html;}location /wap.html{proxy_pass http://testd.skg.com/wap.html;}location /storefront/member/checkCertificateView.html{rewrite .  https://testlogin.skg.com/storefront/member/checkCertificateView.html;}location / {proxy_set_header Host $host;proxy_set_header X-Forward-For $remote_addr;proxy_set_header X-Real-IP $remote_addr;proxy_pass   http://testd.skg.com;}}server {listen       443;server_name testlogin.skg.com; ssl on;ssl_certificate /usr/local/key/server.cer;ssl_certificate_key /usr/local/key/server2.key;ssl_session_timeout 5m;#access_log /var/log/nginx/access.log;#error_log /var/log/nginx/error.log;ssl_protocols SSLv2 SSLv3 TLSv1;ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLV2:+EXP;ssl_prefer_server_ciphers on; #charset koi8-r;location /storefront/member/toLogin.html{proxy_pass http://testd.skg.com/storefront/member/toLogin.html;}location /storefront/member/getValidCode.html{proxy_pass http://testd.skg.com/storefront/member/getValidCode.html;}location /storefront/member/login.html{proxy_pass http://testd.skg.com/storefront/member/login.html;}location /storefront/member/checkLogin.html{proxy_pass http://testd.skg.com/storefront/member/checkLogin.html;}location /storefront/member/cookieLogin.html{proxy_pass http://testd.skg.com/storefront/member/cookieLogin.html;}location /storefront/member/checkCertificateView.html{proxy_pass http://testd.skg.com/storefront/member/checkCertificateView.html;}location /storefront/member/registerByEmail.html{proxy_pass http://testd.skg.com/storefront/member/registerByEmail.html;}location /storefront/member/registerByMobile.html{proxy_pass http://testd.skg.com/storefront/member/registerByMobile.html;}location /storefront/member/logout.html{proxy_pass http://testd.skg.com/storefront/member/logout.html;}location /generateImage.html{proxy_pass http://testd.skg.com/generateImage.html;}location ~* \.(css|js)${root /usr/local/nginx/html/;access_log off;}

}

server {listen       443;server_name testskg.skg.com; ssl on;ssl_certificate /usr/local/key/server.cer;ssl_certificate_key /usr/local/key/server2.key;ssl_session_timeout 5m;#access_log /var/log/nginx/access.log;#error_log /var/log/nginx/error.log;ssl_protocols SSLv2 SSLv3 TLSv1;ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLV2:+EXP;ssl_prefer_server_ciphers on; #charset koi8-r;if ( $request_uri ~* ^/index\.htm$ ){rewrite  ^/index\.htm$   http://testskg.skg.com permanent;}       #location = / {
#      root /usr/local/nginx/html; 
#      index  index.htm index.html;
#      access_log off; 
#     }location ^~ /scripts/{root /usr/local/nginx/html/scripts;access_log off;}location ^~ /styles/{root /usr/local/nginx/html/styles;access_log off;}}server {listen       80;server_name  testo.skg.com;location / {index  index.html index.htm index.jsp;proxy_pass http://testo.skg.com;proxy_set_header Host $host;proxy_set_header X-Forward-For $remote_addr;proxy_set_header X-Real-IP $remote_addr;}}

}

`

轉載于:https://my.oschina.net/u/2419285/blog/844848

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/396674.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/396674.shtml
英文地址,請注明出處:http://en.pswp.cn/news/396674.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

小孩用計算機做作業怎么表達,計算機作業

滿意答案堯Dreaman夕2014.09.25采納率:40% 等級:10已幫助:1121人Windows中可以設置、控制計算機硬件配置和修改桌面布局的應用程序是( D)A) Word B) Excel C)資源管理器 D)控制面板多窗口的切換可以通過(D )來實現A)在任務欄上用鼠標單擊右…

Delphi讀寫二進制文件

http://www.cnblogs.com/hnxxcxg/p/3691742.html 二進制文件(也叫類型文件),二進制文件是由一批同一類型的數據組成的一個數據序列,就是說一個具體的二進制文件只能存放同一種類型的數據。type TMember record Name : string[10]…

[No0000178]改善C#程序的建議1:非用ICloneable不可的理由

好吧,我承認,這是一個反標題,實際的情況是:我找不到一個非用ICloneable不可的理由。事實上,接口ICloneable還會帶來誤解,因為它只有一個Clone方法。 我們都知道,對象的拷貝分為:淺拷…

uniapp網絡請求獲取數據_2.uni-app 發起網絡請求

## uni.request(OBJECT)發起網絡請求。**OBJECT 參數說明**![](https://box.kancloud.cn/a90bf284df069eddde4019c04db7d627_861x475.png)**success 返回參數說明**![](https://box.kancloud.cn/10d44a6d100bb3833b22f2d41e85d8eb_861x165.png)**data 數據說明**最終發送給服務…

SOM 的兩種算法

我參考了這篇文章http://www.scholarpedia.org/article/Kohonen_network另一個很好的演示在這里http://www.math.le.ac.uk/people/ag153/homepage/PCA_SOM/PCA_SOM.htmlSOMt是訓練步一個輸入數據是n維向量待訓練的是一堆節點,這堆節點之間有邊連著,通常是…

python集合的兩種類型_python 入門之 – 集合類型(十九)

在python中,集合是一個無序的,不重復的數據組合,他的主要工作如下:1、去重,把一個列表變成集合,就自動去重了2、關系測試,測試兩組數據之間的交集、差集、并集等關系我來舉個例子,前…

計算機數值計算的相關文章,數值計算論文.doc

數值計算論文PAGE \* MERGEFORMAT 13高斯消去法在電路分析中的應用—利用計算機求解一些復雜電路的參數雷嘉豪電子信息工程學院自動化一班100401102摘 要求解線性代數方程組的數值方法有很多,但歸納起來,可分為兩類:一種是直接法,…

bzoj 2756奇怪的游戲

2756: [SCOI2012]奇怪的游戲 Time Limit: 40 Sec Memory Limit: 128 MBSubmit: 2571 Solved: 685[Submit][Status][Discuss]Description Blinker最近喜歡上一個奇怪的游戲。 這個游戲在一個 N*M 的棋盤上玩,每個格子有一個數。每次 Blinker 會選擇兩個相鄰的格子&…

秒懂,Java 注解 (Annotation)你可以這樣學

轉自: https://blog.csdn.net/briblue/article/details/73824058 文章開頭先引入一處圖片。 這處圖片引自老羅的博客。為了避免不必要的麻煩,首先聲明我個人比較尊敬老羅的。至于為什么放這張圖,自然是為本篇博文服務,接下來我自會說明。好了…

Java技術中的三大特性

為什么80%的碼農都做不了架構師?>>> 1.虛擬機 Java虛擬機JVM(Java Virtual Machine)在Java編程里面具有非常重要的地位,約相當…

matlab圖像增強分段線性函數_圖像增強、銳化,利用 PythonOpenCV 來實現 4 種方法!...

圖像增強目的使得模糊圖片變得更加清晰、圖片模糊的原因是因為像素灰度差值變化不大,圖片各區域產生視覺效果似乎都是一樣的, 沒有較為突出的地方,看起來不清晰的感覺解決這個問題的最直接簡單辦法,放大像素灰度值差值、使圖像中的…

python多人聊天室_Python基于Socket實現簡易多人聊天室

前言套接字(Sockets)是雙向通信信道的端點。 套接字可以在一個進程內,在同一機器上的進程之間,或者在不同主機的進程之間進行通信,主機可以是任何一臺有連接互聯網的機器。套接字可以通過多種不同的通道類型實現:Unix域套接字&…

計算機考研保護一志愿,考研良心大學,保護一志愿的考研名校!

大家好,我是,今天胖胖要跟大家送一些重要的干貨,就是對于選學校的小伙伴來說也好,或者是即將要參加研究生復試的小伙伴們來好胖胖在這里要跟大家說一個關于考研白名單的事情,因為大家都知道考研是會分黑名單和白名單&a…

python變量輸出到文件_使用函數將多個變量寫入文件

首先,要獲得當前正在執行的腳本名,或者更確切地說是調用函數的模塊,必須從堆棧跟蹤中獲取它。globals()-它將在writeToValues()函數的相同上下文中執行,因此它不會從“調用者”接收globals()。要糾正這種情況,您可以使…

嵌入式linux系統移植的四大步驟_嵌入式系統移植步驟

在嵌入式系統移植中重要的一部分是操作系統的移植,與其它操作系統相比,Linux大的特點:它是一款遵循GPL的操作系統,我們可以自由地使用、修改、和擴展它。正是由于這一特色,嵌入式系統移植過程中Linux系統受到越來越多人…

sdn框架的計算機網絡管理,清華SDN實踐--SDN 系統架構與數據中心應用

清華大學在SDN 的系統架構以及其在數據中心網絡中的應用方面展開了深入研究,主要研究成果包括:1. 以數據為中心的軟件定義網絡架構 SODA(Software Defined Data Centric Networking)。與 OpenFlow 相比,SODA 大大增強了數據層面的處理能力&am…

《軟件工程》課之-調查問卷的心得體會

1.這次調查是艱辛的。 2.很多人都誤以為我在發小廣告。。 3.很多人都不認識俄羅斯方塊1010這個游戲。 4.大家對于游戲的見解千奇百怪。 5.題目出的不是很完美,下次改進。。 6.簡單分析下結果,男孩子都喜歡多人的游戲,女孩的喜歡的多種多樣&am…

python循環語句for求和_for循環簡介

## for循環簡介for循環可以用來遍歷某一對象(遍歷:通俗點說,就是把這個循環中的第一個元素到最后一個元素依次訪問一次)。for循環的基本結構如下:![](https://img.kancloud.cn/75/33/753371a9536ed9eeb159074482ec85f0_558x174.png)說明&…

華為備份歷史版本_華為手機NAS備份時提示“需處于同一局域網”的解決方法

本內容來源于什么值得買APP,觀點僅代表作者本人 |作者:噩夢飄雷創作立場聲明:在使用華為手機向群暉NAS中備份時發現一直無法成功,經過一番研究找到了解決方案,希望能幫到大家~前言最近看了一位老哥的帖子&a…

計算機系統集成難點,企業MES實施中存在的難點及建議

MES是企業生產管理服務的核心信息化系統。實施MES是為了將現代企業生產管理思想、理念引入企業生產管理,對企業生產管理流程進行重組和優化,促進企業生產管理水平的提高。可是作用如此大的MES系統在實施過程中能一路無阻嗎?MES系統的作用1.車…