自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Nginx參數(shù)站點(diǎn)配置上的問(wèn)題解決方案

開(kāi)發(fā) 前端
Nginx參數(shù)在文件配置上有不少的問(wèn)題需要我們解決。下面我們就來(lái)詳細(xì)的看看有關(guān)nginx參數(shù)配置問(wèn)題的介紹。希望大家有所收獲。

Nginx參數(shù)有很多經(jīng)典的語(yǔ)句,其中upstream.conf 配置文件就是一個(gè)很好的例子,下面我們就看看如何才能好的使用這些語(yǔ)句呢?下面的文章就會(huì)對(duì)你有很好的幫助,尤其是在了解Nginx參數(shù)上的問(wèn)題。

  1. upstream.conf  
  2. upstream bbs.linuxtone.com {  
  3. server 192.168.1.4:8099;  

Nginx參數(shù)站點(diǎn)配置文件

  1. bbs.linuxtone.conf  
  2. server  
  3. {  
  4. listen 80;  
  5. server_name bbs.linuxtone.conf;  
  6. charset GB2312;  
  7. index index.html index.htm;  
  8. root /date/wwwroot/linuxtone/;  
  9.  
  10. location ~ ^/NginxStatus/ {  
  11. stub_status on;  
  12. access_log off;  
  13. }  
  14. location / {  
  15. root /date/wwwroot/linuxtone/;  
  16. proxy_redirect off ;  
  17. proxy_set_header Host $host;  
  18. proxy_set_header X-Real-IP $remote_addr;  
  19. proxy_set_header REMOTE-HOST $remote_addr;  
  20. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  
  21. client_max_body_size 50m;  
  22. client_body_buffer_size 256k;  
  23. proxy_connect_timeout 30;  
  24. proxy_send_timeout 30;  
  25. proxy_read_timeout 60;  
  26. proxy_buffer_size 256k;  
  27. proxy_buffers 4 256k;  
  28. proxy_busy_buffers_size 256k;  
  29. proxy_temp_file_write_size 256k;  
  30. proxy_next_upstream error timeout invalid_header http_500 http_503 http_404;  
  31. proxy_max_temp_file_size 128m;  
  32. proxy_pass http://bbs.linuxtone.com;  

Nginx參數(shù)都有所調(diào)整.目的是解決代理過(guò)程中出現(xiàn)的一些502 499錯(cuò)誤

  1. #Add expires header for static content  
  2. location ~* \.(jpg|jpeg|gif|png|swf)$ {  
  3. if (-f $request_filename) {  
  4. root /date/wwwroot/linuxtone/;  
  5. expires 1d;  
  6. break;  
  7. }  
  8. }  
  9. log_format access '$remote_addr - $remote_user [$time_local] "$request" '  
  10. '$status $body_bytes_sent "$http_referer" '  
  11. '"$http_user_agent" $http_x_forwarded_for';  
  12. access_log /exp/Nginxlogs/bbs.linuxtone_access.log access;  

以上就是對(duì)Nginx參數(shù)的詳細(xì)介紹,希望大家有所幫助。

【編輯推薦】

  1. Nginx默認(rèn)虛擬主機(jī)如何在server中添加
  2. Nginx配置虛擬主機(jī)具體的代碼配置
  3. Nginx配置文件實(shí)現(xiàn)AWStats靜態(tài)頁(yè)面
  4. Nginx 禁止IP訪問(wèn)的代碼編寫教程
  5. Nginx配置文件如何驗(yàn)證是否準(zhǔn)確

 

責(zé)任編輯:張浩 來(lái)源: 互聯(lián)網(wǎng)
相關(guān)推薦

2010-03-30 16:04:34

Linux Nginx

2012-05-09 10:08:41

跨機(jī)房

2010-09-27 13:14:42

JVM內(nèi)存限制

2009-09-03 16:09:48

.net回車符

2010-05-04 11:30:29

Oracle漢字長(zhǎng)度

2010-10-08 13:09:38

JavaScript數(shù)

2010-02-06 14:54:11

C++指針漂移

2010-05-31 12:53:56

Nagios apac

2010-04-28 19:24:17

Hp unix

2011-03-23 16:38:28

LAMP

2011-08-25 18:35:07

Linux cron執(zhí)

2020-05-06 14:14:50

Linux依賴軟件

2010-04-06 09:33:37

CentOS系統(tǒng)

2010-08-04 10:20:30

Flex組件開(kāi)發(fā)

2010-09-07 09:08:03

DIV彈出層

2010-10-09 12:58:59

JS腳本兼容

2021-01-13 10:18:29

SocketNetty粘包

2010-08-26 08:45:32

margin:0pxa

2010-08-26 12:59:29

marginCSS

2010-02-23 17:49:56

WCF傳輸大數(shù)據(jù)
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)