上接“Cacti和Zabbix所需Apache安装配置(一)”(http://rolandqu.blog.51cto.com/3477736/945717)
上接“Cacti和Zabbix所需Apache安装配置(二)”(http://rolandqu.blog.51cto.com/3477736/945731)
7. httpd-mpm.conf 配置文件示例
- <IfModule !mpm_netware_module>
- PidFile "logs/httpd.pid"
- </IfModule>
- <IfModule !mpm_winnt_module>
- <IfModule !mpm_netware_module>
- LockFile "logs/accept.lock"
- </IfModule>
- </IfModule>
- <IfModule mpm_prefork_module>
- ServerLimit 4000
- StartServers 10
- MinSpareServers 10
- MaxSpareServers 20
- MaxClients 300
- MaxRequestsPerChild 150
- </IfModule>
- <IfModule mpm_worker_module>
- StartServers 2
- MaxClients 150
- MinSpareThreads 25
- MaxSpareThreads 75
- ThreadsPerChild 25
- MaxRequestsPerChild 0
- </IfModule>
- <IfModule mpm_beos_module>
- StartThreads 10
- MaxClients 50
- MaxRequestsPerThread 10000
- </IfModule>
- <IfModule mpm_netware_module>
- ThreadStackSize 65536
- StartThreads 250
- MinSpareThreads 25
- MaxSpareThreads 250
- MaxThreads 1000
- MaxRequestsPerChild 0
- MaxMemFree 100
- </IfModule>
- <IfModule mpm_mpmt_os2_module>
- StartServers 2
- MinSpareThreads 5
- MaxSpareThreads 10
- MaxRequestsPerChild 0
- </IfModule>
- <IfModule mpm_winnt_module>
- ThreadsPerChild 150
- MaxRequestsPerChild 0
- </IfModule>
8. vhosts.conf 配置文件示例
- NameVirtualHost YourServerIpAddr:80
- SetEnvIf Request_URI "\.gif$" dontlog
- SetEnvIf Request_URI "\.jpg$" dontlog
- SetEnvIf Request_URI "\.jpeg$" dontlog
- SetEnvIf Request_URI "\.png$" dontlog
- SetEnvIf Request_URI "\.js$" dontlog
- SetEnvIf Request_URI "\.swf$" dontlog
- SetEnvIf Request_URI "\.css$" dontlog
- SetEnvIf Request_URI "/favicon.ico$" dontlog
- SetEnvIf Request_URI "^/error.wml$" dontlog
- SetEnvIf Request_URI "^/wml.php$" dontlog
- <VirtualHost YourServerIpAddr:80>
- DocumentRoot "/data/website/sample.troodo.net/htdocs"
- ServerName sample.troodo.net
- ServerAlias sample.troodo.net
- ErrorDocument 404 http://sample.troodo.net
- CustomLog "|/usr/local/cronolog/sbin/cronolog /data/website/sample.troodo.net/logs/access_log.%y%m%d" combined env=!dontlog
- ErrorLog "|/usr/local/cronolog/sbin/cronolog /data/website/sample.troodo.net/logs/error_log.%y%m%d"
- <Directory "/troodon/website/lyzabbix.troodo.net/htdocs">
- DirectoryIndex index.wml index.html index.php
- AddHandler server-parsed .shtml
- AddType text/html .shtml
- AddHandler server-parsed .inc
- Options +Includes
- AllowOverride None
- Order allow,deny
- Allow from all
- </Directory>
- </VirtualHost>