erlchina 发表于 2018-11-18 10:01:27

zabbix数据库优化之apache优化(四)

              zabbix数据库优化之apache优化()
  一,Apache调整
  
  LoadModule mpm_event_module modules/mod_mpm_event.so
  
  StartServers 10
  MinSpareThreads 75
  MaxSpareThreads 250
  ThreadsPerChild 25
  MaxRequestWorkers 400
  MaxConnectionsPerChild 0
  
     # 封装指令并根据指定的模块是否启用为条件而决定是否进行处理
  AddType application/x-compress .Z
  AddType application/x-gzip .gz .tgz
  AddType application/x-httpd-php.php    #说明什么样的扩展名使用什么样的程序来处理,描述的是扩展名与处理程序之间的关系。
  AddType application/x-httpd-php-source.phps
  
     #指令为具有特定文件扩展名的文件配置特定处理程序
  SetHandler application/x-httpd-php   #强制所有匹配的文件由处理程序处理
  
  AddType text/html .php
  #不能创建session先注释
  #php_value session.save_handler "files"
  #php_value session.save_path    "/var/lib/php/session"
  #
  #    RedirectMatch (.*) http://www.wooga.com$1
  #
  
  ServerName 0.0.0.0
  DocumentRoot "/usr/share/zabbix"
  DirectoryIndex index.html index.php
  Alias /zabbix /usr/share/zabbix
  
  Options FollowSymLinks
  AllowOverride None
  Require all granted
  
  php_value max_execution_time 300
  php_value memory_limit 128M
  php_value post_max_size 16M
  php_value upload_max_filesize 2M
  php_value max_input_time 300
  php_value always_populate_raw_post_data -1
  # php_value date.timezone Asia/Shanghai
  
  
  # 设置压缩类型
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/xml
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE image/x-icon
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE text/php
  AddOutputFilterByType DEFLATE image/gif image/png image/jpe image/swf image/jpeg image/bmp
  
  
  # 自定义Header
  
  
  



页: [1]
查看完整版本: zabbix数据库优化之apache优化(四)