wampserver optionss配置哪个文件

Browsersync选项配置 - Browsersync中文网
Browsersync options (选项配置)
这些都是可以使用Browsersync时配置的选项。创建一个对象,并把它作为
(用于GulpJS和正常API的使用)。如果你使用Grunt,你仍然可以使用所有这些选项,但是你需要参考详细的
Type: Object
至少需要2.0.0版本
Browsersync通过单独的端口访问可视化控制页面。可视化界面允许控制所有的设备,同步推送更新等等。
port: 8080
port: 8080,
port: 9090
Type: Array | String
Default: false
Browsersync可以在工作中监听文件。您所做的更改要么被注入到页面(CSS和图像),或将导致所有浏览器做一个完整的页面刷新。参加见
关于glob模式的更多信息。
browserSync({
files: "app/css/style.css"
browserSync({
files: ["app/css/style.css", "app/js/*.js"]
browserSync({
"wp-content/themes/**/*.css",
match: ["wp-content/themes/**/*.php"],
function (event, file) {
Type: Object
Default: undefined
至少需要2.6.0版本
文件看着那相处传递选项 .检查他们的文档可供选择
watchOptions: {
ignoreInitial: true,
ignored: '*.txt'
match: ["wp-content/themes/**/*.php"],
fn: function (event, file) {
options: {
ignored: '*.txt'
Type: Object | Boolean
Default: false
使用内置的静态服务器创建基本的HTML / JS / CSS的网站。
baseDir: "app"
baseDir: "app",
directory: true
baseDir: ["app", "dist"]
baseDir: "app",
index: "index.htm"
baseDir: "app",
"/bower_components": "bower_components"
baseDir: "./",
middleware: function (req, res, next) {
console.log("Hi from middleware");
baseDir: "./",
middleware: [
function (req, res, next) {
console.log("Hi from first middleware");
function (req, res, next) {
console.log("Hi from the second middleware");
Type: String | Object | Boolean
代理现有的虚拟主机。Browsersync将包裹你的虚拟主机使用代理网址查看您的网站。
proxy: "local.dev"
proxy: "localhost:8888"
proxy: "localhost/site1"
target: "http://yourlocal.dev",
middleware: function (req, res, next) {
console.log(req.url);
target: "localhost:8000",
reqHeaders: function (config) {
config.urlObj.host,
"accept-encoding": "identity",
Type: Number
Default: 3000
port: 8080
Type: Boolean
Default: undefined
至少需要1.3.0版本
启用HTTPS本地主机。 注意 - 这是没有必要的代理选项,因为它会从你的目标URL推断。
browserSync({
server: "./app",
https: true
browserSync({
https: true
Type: Object
点击,滚动和表单在任何设备上输入将被镜像到所有设备里(当然你必须正确使用了Url)。
ghostMode: {
clicks: true,
forms: true,
scroll: false
ghostMode: false
Type: String
Default: info
可以是“信息”,“调试”,“警告”,或“为空”
logLevel: "debug"
logLevel: "info"
logLevel: "silent"
Type: String
Default: BS
至少需要1.5.1版本
改变控制台日志前缀。如果你正在创建基于Browsersync的项目,这将会很有用
logPrefix: "My Awesome Project"
Type: Boolean
Default: false
logConnections: true
logConnections: false
Type: Boolean
Default: true
logFileChanges: true
logFileChanges: false
Type: : Boolean
Default: true
至少需要1.5.2版本
登录该片段到控制台当你在片段模式(无代理/服务器)
logSnippet: false
Type: Object
至少需要2.0.0版本
从1.7.0以来!您可以控制片段是通过自定义的regex +功能注入到每一页。您还可以提供为模式应该从片段注入忽视某些网址。
snippetOptions: {
ignorePaths: "templates/*.html",
match: /&\/body&/i,
fn: function (snippet, match) {
return snippet +
Type: Array | Boolean
Default: false
至少需要2.4.0版本
添加额外的HTML重写规则
rewriteRules: [
match: /browserSync/g,
fn: function (match) {
return 'kittenz';
Type: String | Boolean
Default: null
tunnel: true
tunnel: "my-private-site"
Type: Boolean
Default: undefined
Browsersync的某些功能 (如 xip & tunnel) 需要互联网连接,但如果你离线工作,你可以通过这个选项设置,以减少启动时间false
online: true
online: false
Type: Boolean | String
Default: true
决定Browsersync启动时自动打开的网址。默认为“本地”,如果没有设置。可以是真实的,local, external, ui, ui-external, tunnel or false
open: false
open: "local"
open: "external"
open: "ui"
open: "tunnel"
Type: String | Array
Default: default
browser: "google chrome"
browser: ["google chrome", "firefox"]
Type: Boolean
Default: false
需要互联网连接-有用的服务,如
,因为它允许您配置领域,如 *.xip.io 在你的包设置
Type: Boolean
Default: false
刷新每个浏览器时Browsersync重新启动。
reloadOnRestart: false
Type: Boolean
Default: true
并不总是需要在浏览器中弹出小超过通知/想要的。
notify: false
Type: Boolean
Default: true
scrollProportionally: false
Type: Number
Default: 0
scrollThrottle: 100
Type: Number
Default: 0
时间,以毫秒为单位,以指示浏览器之前,等待加载/注以下文件更改事件
reloadDelay: 2000
Type: Number
Default: 0
至少需要2.6.0版本
限制在浏览器中的频率:刷新事件可以被发射到连接的客户机
reloadDebounce: 2000
Type: Array
Default: []
至少需要2.6.0版本
用户提供的插件
plugins: ["bs-html-injector"]
plugins: [
module: "bs-snippet-injector",
options: {
file: "./app/index.php"
Type: Boolean
Default: true
injectChanges: true,
injectChanges: false,
Type: String | Null
Default: null
startPath: "/info.php"
Type: Boolean
Default: true
无论是中缩小客户端脚本,还是不行。
minify: false
Type: String
Default: null
host: "192.168.1.1"
Type: Boolean
Default: true
codeSync: true,
Type: Boolean
Default: true
timestamps: false
Type: Function
Default: undefined
至少需要1.5.0版
为改变完全控制了那里的Browsersync JavaScript是从服务的脚本路径。无论你从这个函数返回将用作脚本路径。
scriptPath: function (path) {
return "localhost:3002" +
:由于2.2.0
scriptPath: function (path, port, options) {
return options.get("absolute");
Type: Object
至少需要1.6.2版本
配置Socket.IO路径和命名空间,以避免冲突。注意: 命名空间 也可以是 function
namespace: function (namespace) {
return "localhost:3003" +1378人阅读
服务器(5)
Apache的配置文件http.conf参数含义详解
Apache的配置由httpd.conf文件配置,因此下面的配置指令都是在httpd.conf文件中修改。
主站点的配置(基本配置)
(1) 基本配置:
ServerRoot &/mnt/software/apache2& #你的apache软件安装的位置。其它指定的目录如果没有指定绝对路径,则目录是相对于该目录。
PidFile logs/httpd.pid #第一个httpd进程(所有其他进程的父进程)的进程号文件位置。
Listen 80 #服务器监听的端口号。
ServerName :80 #主站点名称(网站的主机名)。
ServerAdmin
#管理员的邮件地址。
DocumentRoot &/mnt/web/clusting& #主站点的网页存储位置。
以下是对主站点的目录进行访问控制:
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
在上面这段目录属性配置中,主要有下面的选项:
Options:配置在特定目录使用哪些特性,常用的值和基本含义如下:
ExecCGI: 在该目录下允许执行CGI脚本。
FollowSymLinks: 在该目录下允许文件系统使用符号连接。
Indexes: 当用户访问该目录时,如果用户找不到DirectoryIndex指定的主页文件(例如index.html),则返回该目录下的文件列表给用户。
SymLinksIfOwnerMatch: 当使用符号连接时,只有当符号连接的文件拥有者与实际文件的拥有者相同时才可以访问。
其它可用值和含义请参阅:/Apache/ApacheManual/mod/core.html#options
AllowOverride:允许存在于.htaccess文件中的指令类型(.htaccess文件名是可以改变的,其文件名由AccessFileName指令决定):
None: 当AllowOverride被设置为None时。不搜索该目录下的.htaccess文件(可以减小服务器开销)。
All: 在.htaccess文件中可以使用所有的指令。
其他的可用值及含义(如:Options FileInfo AuthConfig Limit等),请参看: /Apache/ApacheManual/mod/core.html#AllowOverride
Order:控制在访问时Allow和Deny两个访问规则哪个优先:
Allow:允许访问的主机列表(可用域名或子网,例如:Allow from 192.168.0.0/16)。
Deny:拒绝访问的主机列表。
更详细的用法可参看:/Apache/ApacheManual/mod/mod_access.html#order
DirectoryIndex index.html index.htm index. #主页文件的设置(本例将主页文件设置为:index.html,index.htm和index.php)
(2) 服务器的优化 (MPM: Multi-Processing Modules)
apache2主要的优势就是对多处理器的支持更好,在编译时同过使用–with-mpm选项来决定apache2的工作模式。如果知道当前的apache2使用什么工作机制,可以通过httpd -l命令列出apache的所有模块,就可以知道其工作方式:
prefork:如果httpd -l列出prefork.c,则需要对下面的段进行配置:
StartServers 5 #启动apache时启动的httpd进程个数。
MinSpareServers 5 #服务器保持的最小空闲进程数。
MaxSpareServers 10 #服务器保持的最大空闲进程数。
MaxClients 150 #最大并发连接数。
MaxRequestsPerChild 1000 #每个子进程被请求服务多少次后被kill掉。0表示不限制,推荐设置为1000。
在该工作模式下,服务器启动后起动5个httpd进程(加父进程共6个,通过ps -ax|grephttpd命令可以看到)。当有用户连接时,apache会使用一个空闲进程为该连接服务,同时父进程会fork一个子进程。直到内存中的空闲进程达到MaxSpareServers。该模式是为了兼容一些旧版本的程序。我缺省编译时的选项。
worker:如果httpd -l列出worker.c,则需要对下面的段进行配置:
StartServers 2 #启动apache时启动的httpd进程个数。
MaxClients 150 #最大并发连接数。
IXDBA.NET社区论坛
MinSpareThreads 25 #服务器保持的最小空闲线程数。
MaxSpareThreads 75 #服务器保持的最大空闲线程数。
ThreadsPerChild 25 #每个子进程的产生的线程数。
MaxRequestsPerChild 0 #每个子进程被请求服务多少次后被kill掉。0表示不限制,推荐设置为1000。
该模式是由线程来监听客户的连接。当有新客户连接时,由其中的一个空闲线程接受连接。服务器在启动时启动两个进程,每个进程产生的线程数是固定的(ThreadsPerChild决定),因此启动时有50个线程。当50个线程不够用时,服务器自动fork一个进程,再产生25个线程。
perchild:如果httpd -l列出perchild.c,则需要对下面的段进行配置:
NumServers 5 #服务器启动时启动的子进程数
StartThreads 5 #每个子进程启动时启动的线程数
MinSpareThreads 5 #内存中的最小空闲线程数
MaxSpareThreads 10 #最大空闲线程数
MaxThreadsPerChild 2000 #每个线程最多被请求多少次后退出。0不受限制。
MaxRequestsPerChild 10000 #每个子进程服务多少次后被重新fork。0表示不受限制。
该模式下,子进程的数量是固定的,线程数不受限制。当客户端连接到服务器时,又空闲的线程提供服务。 如果空闲线程数不够,子进程自动产生线程来为新的连接服务。该模式用于多站点服务器。
(3) HTTP返头回信息配置:
ServerTokens Prod #该参数设置http头部返回的apache版本信息,可用的值和含义如下:
Prod:仅软件名称,例如:apache
Major:包括主版本号,例如:apache/2
Minor:包括次版本号,例如:apache/2.0
Min:仅apache的完整版本号,例如:apache/2.0.54
OS:包括操作系统类型,例如:apache/2.0.54(Unix)
Full:包括apache支持的模块及模块版本号,例如:Apache/2.0.54 (Unix) mod_ssl/2.0.54 OpenSSL/0.9.7g
ServerSignature Off #在页面产生错误时是否出现服务器版本信息。推荐设置为Off
(4) 持久性连接设置
KeepAlive On #开启持久性连接功能。即当客户端连接到服务器,下载完数据后仍然保持连接状态。
MaxKeepAliveRequests 100 #一个连接服务的最多请求次数。
KeepAliveTimeout 30 #持续连接多长时间,该连接没有再请求数据,则断开该连接。缺省为15秒。
对于不在DocumentRoot指定的目录内的页面,既可以使用符号连接,也可以使用别名。别名的设置如下:
Alias /download/ &/var/www/download/& #访问时可以输入:/download/
#对该目录进行访问控制设置
Options Indexes MultiViews
AllowOverride AuthConfig
Order allow,deny
Allow from all
scrīptAlias /cgi-bin/ &/mnt/software/apache2/cgi-bin/& # 访问时可以:/cgi-bin/ 。但是该目录下的CGI脚本文件要加可执行权限!
#设置目录属性
AllowOverride None
Options None
Order allow,deny
Allow from all
个人主页的设置 (public_html)
UserDir public_html (间用户的主页存储在用户主目录下的public_html目录下 URL/~bearzhang/file.html 将读取/home/bearzhang/public_html/file.html 文件)
chmod 755 /home/bearzhang #
使其它用户能够读取该文件。
UserDir /var/html (the URL /~bearzhang/file.html 将读取 /var/html/bearzhang/file.html)
UserDir /var/www/*/docs (the URL /~bearzhang/file.html 将读取 /var/www/bearzhang/docs/file.html)
日志的设置
(1)错误日志的设置
ErrorLog logs/error_log #日志的保存位置
IXDBA.NET社区论坛
LogLevel warn #日志的级别
显示的格式日下:
[Mon Oct 10 15:54:29 2005] [error] [client 192.168.10.22] access to /download/ failed, reason: user admin not allowed access
(2)访问日志设置
日志的缺省格式有如下几种:
LogFormat &%h %l %u %t &%r& %&s %b &%{Referer}i& &%{User-Agent}i&& combined
LogFormat &%h %l %u %t &%r& %&s %b& common #common为日志格式名称
LogFormat &%{Referer}i -& %U& referer
LogFormat &%{User-agent}i& agent
CustomLog logs/access_log common
格式中的各个参数如下:
%h –客户端的ip地址或主机名
%l –The 这是由客户端 identd 判断的RFC 1413身份,输出中的符号 &-& 表示此处信息无效。
%u –由HTTP认证系统得到的访问该网页的客户名。有认证时才有效,输出中的符号 &-& 表示此处信息无效。
%t –服务器完成对请求的处理时的时间。
&%r& –引号中是客户发出的包含了许多有用信息的请求内容。
%&s –这个是服务器返回给客户端的状态码。
%b –最后这项是返回给客户端的不包括响应头的字节数。
&%{Referer}i& –此项指明了该请求是从被哪个网页提交过来的。
&%{User-Agent}i& –此项是客户浏览器提供的浏览器识别信息。
下面是一段访问日志的实例:
192.168.10.22 – bearzhang [10/Oct/:06 +0800] &GET /download/ HTTP/1.1& 200 1228
192.168.10.22 – - [10/Oct/:06 +0800] &GET /icons/blank.gif HTTP/1.1& 304 -
192.168.10.22 – - [10/Oct/:06 +0800] &GET /icons/back.gif HTTP/1.1& 304 -
各参数的详细解释,请参阅:/Apache/ApacheManual/logs.html
用户认证的配置
(1)in the httpd.conf:
AccessFileName .htaccess
Alias /download/ &/var/www/download/&
Options Indexes
AllowOverride AuthConfig
(2) create a password file:
/usr/local/apache2/bin/htpasswd -c /var/httpuser/passwords bearzhang
(3)onfigure the server to request a password and tell the server which users are allowed access.
vi /var/www/download/.htaccess:
AuthType Basic
AuthName &Restricted Files&
AuthUserFile /var/httpuser/passwords
Require user bearzhang
#Require valid-user #all valid user
虚拟主机的配置
(1)基于IP地址的虚拟主机配置
DocumentRoot /www/example1
ServerName
DocumentRoot /www/example2
ServerName www.example2.org
(2) 基于IP和多端口的虚拟主机配置
Listen 172.20.30.40:80
Listen 172.20.30.40:8080
Listen 172.20.30.50:80
Listen 172.20.30.50:8080
DocumentRoot /www/example1-80
ServerName
DocumentRoot /www/example1-8080
ServerName
DocumentRoot /www/example2-80
ServerName www.example1.org
DocumentRoot /www/example2-8080
ServerName www.example2.org
(3)单个IP地址的服务器上基于域名的虚拟主机配置:
# Ensure that Apache listens on port 80
# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80
DocumentRoot /www/example1
ServerName
# Other directives here
DocumentRoot /www/example2
ServerName www.example2.org
# Other directives here
(4)在多个IP地址的服务器上配置基于域名的虚拟主机:
# This is the &main& server running on 172.20.30.40
ServerName
DocumentRoot /www/mainserver
# This is the other address
NameVirtualHost 172.20.30.50
DocumentRoot /www/example1
ServerName
# Other directives here …
IXDBA.NET社区论坛
DocumentRoot /www/example2
ServerName www.example2.org
# Other directives here …
(5)在不同的端口上运行不同的站点(基于多端口的服务器上配置基于域名的虚拟主机):
Listen 8080
NameVirtualHost 172.20.30.40:80
NameVirtualHost 172.20.30.40:8080
ServerName
DocumentRoot /www/domain-80
ServerName
DocumentRoot /www/domain-8080
ServerName www.example2.org
DocumentRoot /www/otherdomain-80
ServerName www.example2.org
DocumentRoot /www/otherdomain-8080
(6)基于域名和基于IP的混合虚拟主机的配置:
NameVirtualHost 172.20.30.40
DocumentRoot /www/example1
ServerName
DocumentRoot /www/example2
ServerName www.example2.org
DocumentRoot /www/example3
ServerName www.example3.net
SSL加密的配置
首先在配置之前先来了解一些基本概念:
证书的概念:首先要有一个根证书,然后用根证书来签发服务器证书和客户证书,一般理解:服务器证书和客户证书是平级关系。SSL必须安装服务器证书来认证。 因此:在此环境中,至少必须有三个证书:根证书,服务器证书,客户端证书。在生成证书之前,一般会有一个私钥,同时用私钥生成证书请求,再利用证书服务器的根证来签发证书。
SSL所使用的证书可以自己生成,也可以通过一个商业性
CA(如Verisign 或 Thawte)签署证书。
签发证书的问题:如果使用的是商业证书,具体的签署方法请查看相关销售商的说明;如果是知己签发的证书,可以使用openssl自带的CA.sh脚本工具。
IXDBA.NET社区论坛
如果不为单独的客户端签发证书,客户端证书可以不用生成,客户端与服务器端使用相同的证书。
(1) conf/ssl.conf 配置文件中的主要参数配置如下:
Listen 443
SSLPassPhraseDialog buildin
#SSLPassPhraseDialog exec:/path/to/program
SSLSessionCache dbm:/usr/local/apache2/logs/ssl_scache
SSLSessionCacheTimeout 300
SSLMutex file:/usr/local/apache2/logs/ssl_mutex
# General setup for the virtual host
DocumentRoot &/usr/local/apache2/htdocs&
ServerName :443
ServerAdmin
ErrorLog /usr/local/apache2/logs/error_log
TransferLog /usr/local/apache2/logs/access_log
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /usr/local/apache2/conf/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/apache2/conf/ssl.key/server.key
CustomLog /usr/local/apache2/logs/ssl_request_log &%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x &%r& %b&
(2) 创建和使用自签署的证书:
a.Create a RSA private key for your Apache server
/usr/local/openssl/bin/openssl genrsa -des3 -out /usr/local/apache2/conf/ssl.key/server.key 1024
b. Create a Certificate Signing Request (CSR)
/usr/local/openssl/bin/openssl req -new -key/usr/local/apache2/conf/ssl.key/server.key -out/usr/local/apache2/conf/ssl.key/server.csr
c. Create a self-signed CA Certificate (X509 structure) with the RSA key of the CA
/usr/local/openssl/bin/openssl req -x509 -days 365 -key/usr/local/apache2/conf/ssl.key/server.key -in/usr/local/apache2/conf/ssl.key/server.csr -out/usr/local/apache2/conf/ssl.crt/server.crt
/usr/local/openssl/bin/openssl genrsa 1024 -out server.key
/usr/local/openssl/bin/openssl req -new -key server.key -out server.csr
/usr/local/openssl/bin/openssl req -x509 -days 365 -key server.key -in server.csr -out server.crt
(3) 创建自己的CA(认证证书),并使用该CA来签署服务器的证书。
cp openssl-0.9.7g/apps/CA.sh /CA
./CA.sh -newca
openssl genrsa -des3 -out server.key 1024
openssl req -new -key server.key -out server.csr
cp server.csr newreq.pem
./CA.sh -sign
cp newcert.pem /usr/local/apache2/conf/ssl.crt/server.crt
cp server.key /usr/local/apache2/conf/ssl.key/
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:16912次
排名:千里之外
转载:36篇
(1)(2)(2)(3)(4)(2)(7)(8)(2)(5)(3)
(window.slotbydup = window.slotbydup || []).push({
id: '4740881',
container: s,
size: '200,200',
display: 'inlay-fix'用户名:水善几于道
文章数:36
访问量:25911
注册日期:
阅读量:1297
阅读量:3317
阅读量:580832
阅读量:464307
51CTO推荐博文
Zabbix Server端配置文件说明# This is a configuration file for Zabbix Server process# To get more information about Zabbix,# visit ############ GENERAL PARAMETERS #################### Option: NodeID# & Unique NodeID in distributed setup.# & 0 - standalone server## Mandatory: no# Range: 0-999# Default:#说明:服务端节点Id,0表示只有一台服务端;主要用于服务端分布式部署时,视使用者设计ZABBIX系统架构调整# NodeID=0### Option: ListenPort# & Listen port for trapper.## Mandatory: no# Range: # Default:#说明:服务端监听端口用于接收二级代理或直连AGENT的采集数据# ListenPort=10051### Option: SourceIP# & Source IP address for outgoing connections.## Mandatory: no# Default:#说明:服务端监听IP,建议指定# SourceIP=### Option: LogFile# & Name of log file.# & If not set, syslog is used.## Mandatory: no# Default:# LogFile=#说明:zabbix服务端日志路径,视具体情况指定LogFile=/smp/sncmon/zabbix_server.log### Option: LogFileSize# & Maximum size of log file in MB.# & 0 - disable automatic log rotation.## Mandatory: no# Range: 0-1024# Default:#说明:日志达到多少M里就轮转;若此参数值为0时,则不轮转,日志将不断变大,建议设置成轮转# LogFileSize=1### Option: DebugLevel# & Specifies debug level# & 0 - no debug 无日志# & 1 - critical information &灾难日志,日志量较少# & 2 - error information &错误级别,日志量大于CRITICAL级别# & 3 - warnings & &告警级别,日志量大于ERROR级别# & 4 - for debugging (produces lots of information)调试级别,日志量大于WARNING## Mandatory: no# Range: 0-4# Default:#说明:日志级别0~4,单位时间内生成日志的量不断增大# DebugLevel=3### Option: PidFile# & Name of PID file.## Mandatory: no# Default:#说明:zabbix服务端程序PID路径# PidFile=/tmp/zabbix_server.pid### Option: DBHost# & Database host name.# & If set to localhost, socket is used for&.# & If set to empty string, socket is used for PostgreSQL.## Mandatory: no# Default:#说明:指定数据库信息,对于mysql,若设置为localhost则mysql用SOCKET来连接(需配合参数 DBSocket 使用),否则用IP连接;若DHHOST值为空,则默认连接PostgreSQL# DBHost=localhost### Option: DBName# & Database name.# & For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.## Mandatory: yes# Default:# DBName=#说明:服务端连接数据库的库名DBName=smp### Option: DBSchema# & Schema name. Used for IBM DB2.## Mandatory: no# Default:#说明:专门用于 IBM DB2数据库的连接信息# DBSchema=### Option: DBUser# & Database user. Ignored for SQLite.## Mandatory: no# Default:#说明:连接数据库的用户# DBUser=DBUser=root### Option: DBPassword# & Database password. Ignored for SQLite.# & Comment this line if no password is used.## Mandatory: no# Default:#说明:连接数据库的密码DBPassword=123### Option: DBSocket# & Path to&&socket.## Mandatory: no# Default:#说明:指定MYSQL的SOCK连接路径# DBSocket=/tmp/mysql.sock### Option: DBPort# & Database port when not using local socket. Ignored for SQLite.## Mandatory: no# Range: # Default (for MySQL):#说明:指定连接数据库的端口DBPort=3306############ ADVANCED PARAMETERS #################高级参数### Option: StartPollers# & Number of pre-forked instances of pollers.## Mandatory: no# Range: 0-1000# Default:#说明;初始化时,启动子进程数量,数量越多,则服务端吞吐能力越强,对系统资源消耗越大# StartPollers=5### Option: StartIPMIPollers# & Number of pre-forked instances of IPMI pollers.## Mandatory: no# Range: 0-1000# Default:##说明:主要用于IPmi技术用于获取硬件状态场景。若无相关监控项,建议设置为0# StartIPMIPollers=0### Option: StartPollersUnreachable# & Number of pre-forked instances of pollers for unreachable hosts (including IPMI).## Mandatory: no# Range: 0-1000# Default:#说明:默认情况下,ZABBIX会启用指定进程用于探测某些不可达主机的(含IPMI场景);若使用场景中含有代理端,建议保持默认;若直接agent较多,可视具体情况调整# StartPollersUnreachable=1### Option: StartTrappers# & Number of pre-forked instances of trappers.# & Trappers accept incoming connections from Zabbix sender, active agents, active proxies and child nodes.# & At least one trapper process must be running to display server availability in the frontend.## Mandatory: no# Range: 0-1000# Default:说明:用于设置诸如SNMP STRAPPER场景提交来的数据的接收进程数,若客户机SNMP TRAPPER技术较多,建议加大此参数值# StartTrappers=5### Option: StartPingers# & Number of pre-forked instances of ICMP pingers.## Mandatory: no# Range: 0-1000# Default:#说明:用于设置启用icmp协议PING主机方式启动线程数量,若单台代理所管理机器超过500台,建议加大此数值# StartPingers=1### Option: StartDiscoverers# & Number of pre-forked instances of discoverers.## Mandatory: no# Range: 0-250# Default:说明:用于设置自动发现主机的线程数量,若单台代理所管理机器超过500台,可以考虑加大此数值(仅适用于直接AGENT场景)# StartDiscoverers=1### Option: StartHTTPPollers# & Number of pre-forked instances of HTTP pollers.## Mandatory: no# Range: 0-1000# Default:#说明:用于设置WEB拨测监控线程数,可视具体情况增加或减少此数值。# StartHTTPPollers=1### Option: StartTimers# & Number of pre-forked instances of timers.# & Timers process time-based trigger functions and maintenance periods.# & Only the first timer process handles the maintenance periods.## Mandatory: no# Range: 1-1000# Default:#说明:各实例计时器数量,主要用于触发器,标有维护标识的主机,但只第一个计时器用于计算维护标识主机。# StartTimers=1### Option: JavaGateway# & IP address (or hostname) of Zabbix Java gateway.# & Only required if Java pollers are started.## Mandatory: no# Default:#说明:JAVAGATEWAY 场景下使用# JavaGateway=### Option: JavaGatewayPort# & Port that Zabbix Java gateway listens on.## Mandatory: no# Range: # Default:#说明:JAVAGATEWAY 场景下使用# JavaGatewayPort=10052### Option: StartJavaPollers# & Number of pre-forked instances of Java pollers.## Mandatory: no# Range: 0-1000# Default:#说明:JAVAGATEWAY 场景下使用# StartJavaPollers=0### Option: StartVMwareCollectors# & Number of pre-forked vmware collector instances.## Mandatory: no# Range: 0-250# Default:#说明:用于设置监控VMWARE Esxi主机实例时使用,若为0则不启用,若要监控ESXI主机,此值最少为1 ;视监控ESXI数量设置对应数值# StartVMwareCollectors=0### Option: VMwareFrequency# & How often Zabbix will connect to VMware service to obtain a new data.## Mandatory: no# Range: 10-86400# Default:#说明:代理端访问 VMWARE service的频率,单位:秒# VMwareFrequency=60### Option: VMwareCacheSize# & Size of VMware cache, in bytes.# & Shared memory size for storing VMware data.# & Only used if VMware collectors are started.## Mandatory: no# Range: 256K-2G# Default:#说明:划出多少共享内存用于存储VMWARE数据# VMwareCacheSize=8M### Option: SNMPTrapperFile# & Temporary file used for passing data from SNMP trap daemon to the server.# & Must be the same as in zabbix_trap_receiver.pl or SNMPTT configuration file.## Mandatory: no# Default:#说明:指定SNMP TRAPPER 时的临时文件,用于代理端启用SNMP TRAPPER功能时使用# SNMPTrapperFile=/tmp/zabbix_traps.tmp### Option: StartSNMPTrapper# & If 1, SNMP trapper process is started.## Mandatory: no# Range: 0-1# Default:#说明:是否启用 snmptrapper功能 ,默认不启用=0,启用=1(配合参数SNMPTrapperFile使用)# StartSNMPTrapper=0### Option: ListenIP# & List of comma delimited IP addresses that the trapper should listen on.# & Trapper will listen on all network interfaces if this parameter is missing.## Mandatory: no# Default:说明:启用SNMPTRAPPER里 ,接收端监听的IP,此参数与StartSNMPTrapper,SNMPTrapperFile 联合使用# ListenIP=0.0.0.0# ListenIP=127.0.0.1### Option: HousekeepingFrequency# & How often Zabbix will perform housekeeping procedure (in hours).# & Housekeeping is removing unnecessary information from history, alert, and alarms tables.## Mandatory: no# Range: 1-24# Default:#说明:多少小时清理一次代理端数据库的 history, alert, and alarms,以保持代理端数据库轻便,建议保持默认# HousekeepingFrequency=1### Option: MaxHousekeeperDelete# & The table "housekeeper" contains "tasks" for housekeeping procedure in the format:# & [housekeeperid], [tablename], [field], [value].# & No more than 'MaxHousekeeperDelete' rows (corresponding to [tablename], [field], [value])# & will be deleted per one task in one housekeeping cycle.# & SQLite3 does not use this parameter, deletes all corresponding rows without a limit.# & If set to 0 then no limit is used at all. In this case you must know what you are doing!## Mandatory: no# Range: 0-1000000# Default:# MaxHousekeeperDelete=500### Option: SenderFrequency# & How often Zabbix will try to send unsent alerts (in seconds).## Mandatory: no# Range: 5-3600# Default:#说明:多少秒后重试发送失败的报警信息# SenderFrequency=30### Option: CacheSize# & Size of configuration cache, in bytes.# & Shared memory size for storing host, item and trigger data.## Mandatory: no# Range: 128K-2G# Default:#说明;zabbix初始化时占用多少系统共享内存用于存储配置信息,HOST,ITEM,TRIGGER数据,视监控主机数量和监控项调整,建议调整到32M或者更大# CacheSize=8M### Option: CacheUpdateFrequency# & How often Zabbix will perform update of configuration cache, in seconds.## Mandatory: no# Range: 1-3600# Default:#说明:zabbix更新操作系统CACHE频率,若管理页面操作不频繁,可以考虑加大参数值# CacheUpdateFrequency=60### Option: StartDBSyncers# & Number of pre-forked instances of DB Syncers## Mandatory: no# Range: 1-100# Default:#说明:将采集数据从CACHE同步到数据库线程数量,视数据库服务器I/O繁忙情况,和数据库写能力调整。数值越大,写能力越强。对数据库服务器I/O压力越大。# StartDBSyncers=4### Option: HistoryCacheSize# & Size of history cache, in bytes.# & Shared memory size for storing history data.## Mandatory: no# Range: 128K-2G# Default:#说明:用于设置划分多少系统共享内存用于存储采集的历史数据,此数值越大,数据库读压力越小# HistoryCacheSize=8M### Option: TrendCacheSize# & Size of trend cache, in bytes.# & Shared memory size for storing trends data.## Mandatory: no# Range: 128K-2G# Default:#说明:用于设置划分多少系统共享内存用于存储计算出来的趋势数据,此参数值从一定程度上可影响数据库读压力# TrendCacheSize=4M### Option: HistoryTextCacheSize# & Size of text history cache, in bytes.# & Shared memory size for storing character, text or log history data.## Mandatory: no# Range: 128K-2G# Default:#说明:指定划出多少系统共享内存用于存储 character, text or log history数据,若二级代理内存足够,建议可适当扩大此数值,可很大程度上解决系统I/O压力,和数据库读压力# HistoryTextCacheSize=16M### Option: ValueCacheSize# & Size of history value cache, in bytes.# & Shared memory size for caching item history data requests# & Setting to 0 disables value cache.## Mandatory: no# Range: 0,128K-64G# Default:#说明:划出系统多少共享内存用于已请求的存储监控项信息,若监控项较多,建议加大此数值# ValueCacheSize=8M### Option: NodeNoEvents# & If set to '1' local events won't be sent to master node.# & This won't impact ability of this node to propagate events from its child nodes.## Mandatory: no# Range: 0-1# Default:#说明:若节点为子结点,是否允许本地事件(events表)发送到主节点,1为不发送,但不影响此节点以下的节点的传播能力,视ZABBIX分布式系统架构设计开启或关闭。在不明架构前提下,建议保持默认# NodeNoEvents=0### Option: NodeNoHistory# & If set to '1' local history won't be sent to master node.# & This won't impact ability of this node to propagate history from its child nodes.## Mandatory: no# Range: 0-1# Default:说明:若节点为子结点,是否允许本地历史数据发送到主节点,1为不发送,但不影响此节点以下的节点的传播能力,视ZABBIX分布式系统架构设计开启或关闭,在不明架构前提下,建议保持默认# NodeNoHistory=0### Option: Timeout# & Specifies how long we wait for agent, SNMP device or external check (in seconds).## Mandatory: no# Range: 1-30# Default:#说明:与AGNET\SNMP设备和其它外部设备通信超时设置,单位为秒;若采集数据不完整或网络繁忙,或从管理页面发现客户端状态变化频繁,可以考虑加大此数值。注意若此数值加大,应该考虑参数 StartPollers 是否有相应加大的必要。# Timeout=3### Option: TrapperTimeout# & Specifies how many seconds trapper may spend processing new data.## Mandatory: no# Range: 1-300# Default:#说明:启用 trapper功能,用于进程等待超时设置。根据需要调整# TrapperTimeout=300### Option: UnreachablePeriod# & After how many seconds of unreachability treat a host as unavailable.## Mandatory: no# Range: 1-3600# Default:#说明:当AGNET端处于不可用状态下,间隔多少秒后,尝试重新连接。建议根据具体情况设置。注意,若此数值过小,右agent端业务系统繁忙时,有可能造成报警信息误报# UnreachablePeriod=45### Option: UnavailableDelay# & How often host is checked for availability during the unavailability period, in seconds.## Mandatory: no# Range: 1-3600# Default:#说明:当AGENT端处于可用状态下,间隔多少秒后,进行状态检查。若出现可正常采集数据,但管理页面AGENT状态不正常;若在网络,端口等均通畅情况下,AGENT状态仍不正常,可以考虑加大此数值# UnavailableDelay=60### Option: UnreachableDelay# & How often host is checked for availability during the unreachability period, in seconds.## Mandatory: no# Range: 1-3600# Default:#说明:当agent端处于不可达状态下,延迟多少秒后,进行重新尝试,建议保持默认,在AGENT接入调试阶段,可考虑减少此数值# UnreachableDelay=15### Option: AlertScriptsPath# & Full path to location of custom alert scripts.# & Default depends on compilation options.## Mandatory: no# Default:#说明:监控报警脚本路径,非研发人员不建议修改此参数值# AlertScriptsPath=${datadir}/zabbix/alertscripts### Option: ExternalScripts# & Full path to location of external scripts.# & Default depends on compilation options.## Mandatory: no# Default:#说明:自定义脚本存储路径,非研发人员不建议修改此参数值# ExternalScripts=${datadir}/zabbix/externalscripts### Option: FpingLocation# & Location of fping.# & Make sure that fping binary has root ownership and SUID flag set.## Mandatory: no# Default:#说明:IPv4 FPING命令路径,仅ROOT可用。注意使用此命令时,应该确认此命令是否存在# FpingLocation=/usr/sbin/fping### Option: Fping6Location# & Location of fping6.# & Make sure that fping6 binary has root ownership and SUID flag set.# & Make empty if your fping utility is capable to process IPv6 addresses.## Mandatory: no# Default:#说明:IPv6 FPING命令路径,仅ROOT可用。注意使用此命令时,应该确认此命令是否存在# Fping6Location=/usr/sbin/fping6### Option: SSHKeyLocation# & Location of public and private keys for SSH checks and actions.## Mandatory: no# Default:#说明:在服务端需要SSH到AGENT端且采用用KEY验证方式时使用。非研发人员,不建议修改或设置# SSHKeyLocation=### Option: LogSlowQueries# & How long a database query may take before being logged (in milliseconds).# & Only works if DebugLevel set to 3 or 4.# & 0 - don't log slow queries.## Mandatory: no# Range: 1-3600000# Default:#说明:用于服务端数据库慢查询功能,单位是毫秒;1毫秒=0.001秒,若有服务端数据库监控慢查询的需求,可以视具体情况调整此数。# LogSlowQueries=0### Option: TmpDir# & Temporary directory.## Mandatory: no# Default:#说明:zabbix服务端工作的临时目录# TmpDir=/tmp### Option: StartProxyPollers# & Number of pre-forked instances of pollers for passive proxies.## Mandatory: no# Range: 0-250# Default:#说明:启用多少子进程与代理端通信,若代理端较多可考虑加大此数值# StartProxyPollers=1### Option: ProxyConfigFrequency# & How often Zabbix Server sends configuration data to a Zabbix Proxy in seconds.# & This parameter is used only for proxies in the passive mode.## Mandatory: no# Range: 1-# Default:#说明:zabbix服务端将配置文件数据同步到代理端的频率,仅适用于代理端为被动模式情况 下# ProxyConfigFrequency=3600### Option: ProxyDataFrequency# & How often Zabbix Server requests history data from a Zabbix Proxy in seconds.# & This parameter is used only for proxies in the passive mode.## Mandatory: no# Range: 1-3600# Default:说明:zabbix服务端请求代理端采集的数据的频率,仅适用代理端为被动模式情况下# ProxyDataFrequency=1### Option: AllowRoot# & Allow the server to run as 'root'. If disabled and the server is started by 'root', the server# & will try to switch to user 'zabbix' instead. Has no effect if started under a regular user.# & 0 - do not allow 不允许# & 1 - allow 允许## Mandatory: no# Default:#说明:是否允许以root身份运行服务端# AllowRoot=0### Option: Include# & You may include individual files or all files in a directory in the configuration file.# & InstallingZabbix will create include directory in /usr/local/etc, unless modified during the compile time.## Mandatory: no# Default:#说明:在一些情况下,软件的参数配置文件很长,为了方便管理,将配置文件切割成N个配置文件,但为了主配置参数文件的简洁,便会启用INCLUDE参数,以方便程序读取指定目录下的所有配置文件# Include=# Include=/usr/local/etc/zabbix_server.general.conf# Include=/usr/local/etc/zabbix_server.conf.d/####### LOADABLE MODULES ########## Option: LoadModulePath# & Full path to location of server modules.# & Default depends on compilation options.## Mandatory: no# Default:#指定本地模块路径,非研发人员不建议修改# LoadModulePath=${libdir}/modules### Option: LoadModule# & Module to load at server startup. Modules are used to extend functionality of the server.# & Format: LoadModule=&module.so&# & The modules must be located in directory specified by LoadModulePath.# & It is allowed to include multiple LoadModule parameters.## Mandatory: no# Default:#指定本地模块路径,非研发人员不建议修改# LoadModule=这个就是zabbix-server配置文件的详细解释,希望能帮助到大家。原文出处:http://www.it165.net/os/html/5.html
了这篇文章
类别:┆阅读(0)┆评论(0)

我要回帖

更多关于 httpserveroptions 的文章

 

随机推荐