zabbix php 优化,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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值