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

Nginx負(fù)載均衡配置的菜鳥修煉秘籍

開發(fā) 前端
Nginx負(fù)載均衡配置對于很多網(wǎng)管員來說都是一項十分重要的必修課。下面的文章主要介紹了有關(guān)Nginx負(fù)載均衡配置的命令編寫。

Nginx負(fù)載均衡配置是一個十分重要的命令,要如何才能掌握好呢?下面我們就來仔細(xì)的學(xué)習(xí)下有關(guān)于Nginx負(fù)載均衡配置的相關(guān)命令編寫。希望大家在之后的使用中有所收獲。

  1. user nobody; #work user  
  2. worker_processes 1; #work process number, acording to you cpu number  
  3. #error_log logs/error.log;  
  4. #error_log logs/error.log notice;  
  5. #error_log logs/error.log info;  
  6. #pid logs/Nginx.pid;  
  7. events {  
  8. use epoll; #linux best event mode  
  9. worker_connections 1024; # most connects of one work process  
  10. }  
  11. http {  
  12. include mime.types;  
  13. default_type application/octet-stream;  
  14. log_format main '$remote_addr - $remote_user [$time_local] $request '  
  15. '"$status" $body_bytes_sent "$http_referer" '  
  16. '"$http_user_agent" "$http_x_forwarded_for"';  
  17. access_log logs/access.log main; # log file name  
  18. sendfile on;  
  19. #tcp_nopush on;  
  20. #keepalive_timeout 0;  
  21. keepalive_timeout 65;  
  22. #gzip on;  
  23. upstream itsm {  
  24. ip_hash;  
  25. server localhost:8081;  
  26. server localhost:8082;  
  27. }  
  28. server {  
  29. listen 80;  
  30. server_name www.kiko.com;  
  31. charset utf-8;  
  32. access_log logs/host.access.log main;  
  33. location /Nginxstatus {  
  34. stub_status on; #Nginx status watch  
  35. access_log off;  
  36. }  
  37. location / {  
  38. proxy_pass http://itsm;  
  39. proxy_set_header X-Real-IP $remote_addr;  
  40. }  
  41. #location / {  
  42. # root html;  
  43. # index index.html index.htm;  
  44. #}  
  45. #error_page 404 /404.html;  
  46. # redirect server error pages to the static page /50x.html  
  47. #  
  48. error_page 500 502 503 504 /50x.html;  
  49. location = /50x.html {  
  50. root html;  
  51. }  
  52. }  

 

以上就是對Nginx負(fù)載均衡配置的詳細(xì)介紹。希望大家有所收獲。

【編輯推薦】

  1. Nginx重啟的簡單命令 kill
  2. 深入學(xué)習(xí)有關(guān)Nginx負(fù)載均衡的安裝過程
  3. 修改Nginx php.ini文件的經(jīng)典教程
  4. Nginx反向代理支持的各種編程語言
  5. Nginx內(nèi)核優(yōu)化的源代碼探秘
責(zé)任編輯:張浩 來源: IT168
相關(guān)推薦

2014-07-28 11:37:49

NginxTomcat

2010-03-25 18:52:15

Nginx負(fù)載均衡

2010-05-04 13:32:37

nginx負(fù)載均衡器

2012-07-31 09:25:42

nginx負(fù)載均衡反向代理

2013-04-22 11:29:14

Nginx

2012-12-07 10:14:48

Nginx負(fù)載均衡

2011-12-02 22:51:46

Nginx負(fù)載均衡

2010-05-07 12:23:23

nginx負(fù)載均衡

2010-05-04 13:38:25

nginx負(fù)載均衡器

2019-07-09 15:10:02

Nginx反向代理負(fù)載均衡

2010-05-07 12:27:53

nginx負(fù)載均衡

2017-12-18 12:04:02

Nginx代理均衡

2021-04-15 11:22:36

運維架構(gòu)技術(shù)

2011-02-17 09:45:54

FreeBSD 8.1nginx負(fù)載均衡

2011-01-07 11:14:17

Nginx負(fù)載均衡負(fù)載均衡

2010-05-06 10:01:26

nginx負(fù)載均衡

2011-09-01 10:23:47

Nginx負(fù)載均衡器負(fù)載均衡

2010-04-25 17:05:48

lvs負(fù)載均衡

2018-02-01 10:31:12

Nginx負(fù)載均衡軟件

2020-04-20 20:27:59

Nginx動靜分離負(fù)載均衡
點贊
收藏

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