日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
Nginx參數(shù)站點(diǎn)配置上的問題解決方案

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

創(chuàng)新互聯(lián),專注為中小企業(yè)提供官網(wǎng)建設(shè)、營(yíng)銷型網(wǎng)站制作、成都響應(yīng)式網(wǎng)站建設(shè)公司、展示型網(wǎng)站建設(shè)、成都網(wǎng)站制作等服務(wù),幫助中小企業(yè)通過網(wǎng)站體現(xiàn)價(jià)值、有效益。幫助企業(yè)快速建站、解決網(wǎng)站建設(shè)與網(wǎng)站營(yíng)銷推廣問題。

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

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. location ~ ^/NginxStatus/ {
  10. stub_status on;
  11. access_log off;
  12. }
  13. location / {
  14. root /date/wwwroot/linuxtone/;
  15. proxy_redirect off ;
  16. proxy_set_header Host $host;
  17. proxy_set_header X-Real-IP $remote_addr;
  18. proxy_set_header REMOTE-HOST $remote_addr;
  19. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  20. client_max_body_size 50m;
  21. client_body_buffer_size 256k;
  22. proxy_connect_timeout 30;
  23. proxy_send_timeout 30;
  24. proxy_read_timeout 60;
  25. proxy_buffer_size 256k;
  26. proxy_buffers 4 256k;
  27. proxy_busy_buffers_size 256k;
  28. proxy_temp_file_write_size 256k;
  29. proxy_next_upstream error timeout invalid_header http_500 http_503 http_404;
  30. proxy_max_temp_file_size 128m;
  31. proxy_pass http://bbs.linuxtone.com;
  32. }

Nginx參數(shù)都有所調(diào)整.目的是解決代理過程中出現(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;
  13. }

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


當(dāng)前名稱:Nginx參數(shù)站點(diǎn)配置上的問題解決方案
分享鏈接:http://m.5511xx.com/article/cdgsidi.html