5ol.cc 发表于 2018-11-15 11:50:41

apache、nginx配置负载均衡(实测不好用)

ServerRoot "/etc/httpd"  Listen 80
  SSLProxyEngine on
  ProxyPass / balancer://proxy/
  
  BalancerMember https://www.w3cschool.cn:443/ loadfactor=5
  BalancerMember https://legacy.gitbook.com:443/ loadfactor=3
  
  Include conf.modules.d/*.conf
  User apache
  Group apache
  ServerAdmin root@localhost
  
  AllowOverride none
  Require all denied
  
  DocumentRoot "/var/www/html"
  
  AllowOverride None
  Require all granted
  
  
  Options Indexes FollowSymLinks
  AllowOverride None
  Require all granted
  
  
  DirectoryIndex index.html
  
  
  Require all denied
  
  ErrorLog "logs/error_log"
  LogLevel warn
  
  LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  LogFormat "%h %l %u %t \"%r\" %>s %b" common
  
  LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  
  CustomLog "logs/access_log" combined
  
  
  ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
  
  
  AllowOverride None
  Options None
  Require all granted
  
  
  TypesConfig /etc/mime.types
  AddType application/x-compress .Z
  AddType application/x-gzip .gz .tgz
  AddType text/html .shtml
  AddOutputFilter INCLUDES .shtml
  
  AddDefaultCharset UTF-8
  
  MIMEMagicFile conf/magic
  
  EnableSendfile on
  IncludeOptional conf.d/*.conf

页: [1]
查看完整版本: apache、nginx配置负载均衡(实测不好用)