Cacti和Zabbix所需Apache安裝配置(三)

上接“Cacti和Zabbix所需Apache安裝配置(一)”(http://rolandqu.blog.51cto.com/3477736/945717) 

上接“Cacti和Zabbix所需Apache安裝配置(二)”(http://rolandqu.blog.51cto.com/3477736/945731

7. httpd-mpm.conf 配置文件示例

  1. <IfModule !mpm_netware_module> 
  2.     PidFile "logs/httpd.pid" 
  3. </IfModule> 
  4. <IfModule !mpm_winnt_module> 
  5. <IfModule !mpm_netware_module> 
  6. LockFile "logs/accept.lock" 
  7. </IfModule> 
  8. </IfModule> 
  9. <IfModule mpm_prefork_module> 
  10.     ServerLimit        4000 
  11.     StartServers         10 
  12.     MinSpareServers      10 
  13.     MaxSpareServers      20 
  14.     MaxClients          300 
  15.     MaxRequestsPerChild 150 
  16. </IfModule> 
  17. <IfModule mpm_worker_module> 
  18.     StartServers          2 
  19.     MaxClients          150 
  20.     MinSpareThreads      25 
  21.     MaxSpareThreads      75  
  22.     ThreadsPerChild      25 
  23.     MaxRequestsPerChild   0 
  24. </IfModule> 
  25. <IfModule mpm_beos_module> 
  26.     StartThreads            10 
  27.     MaxClients              50 
  28.     MaxRequestsPerThread 10000 
  29. </IfModule> 
  30. <IfModule mpm_netware_module> 
  31.     ThreadStackSize      65536 
  32.     StartThreads           250 
  33.     MinSpareThreads         25 
  34.     MaxSpareThreads        250 
  35.     MaxThreads            1000 
  36.     MaxRequestsPerChild      0 
  37.     MaxMemFree             100 
  38. </IfModule> 
  39. <IfModule mpm_mpmt_os2_module> 
  40.     StartServers           2 
  41.     MinSpareThreads        5 
  42.     MaxSpareThreads       10 
  43.     MaxRequestsPerChild    0 
  44. </IfModule> 
  45. <IfModule mpm_winnt_module> 
  46.     ThreadsPerChild      150 
  47.     MaxRequestsPerChild    0 
  48. </IfModule> 

8. vhosts.conf 配置文件示例

  1. NameVirtualHost YourServerIpAddr:80 
  2. SetEnvIf Request_URI "\.gif$" dontlog 
  3. SetEnvIf Request_URI "\.jpg$" dontlog 
  4. SetEnvIf Request_URI "\.jpeg$" dontlog 
  5. SetEnvIf Request_URI "\.png$" dontlog 
  6. SetEnvIf Request_URI "\.js$" dontlog 
  7. SetEnvIf Request_URI "\.swf$" dontlog 
  8. SetEnvIf Request_URI "\.css$" dontlog 
  9. SetEnvIf Request_URI "/favicon.ico$" dontlog 
  10. SetEnvIf Request_URI "^/error.wml$" dontlog 
  11. SetEnvIf Request_URI "^/wml.php$" dontlog 
  12. <VirtualHost YourServerIpAddr:80> 
  13.     DocumentRoot "/data/website/sample.troodo.net/htdocs" 
  14.     ServerName sample.troodo.net
  15.     ServerAlias sample.troodo.net
  16.     ErrorDocument 404 http://sample.troodo.net
  17.     CustomLog "|/usr/local/cronolog/sbin/cronolog /data/website/sample.troodo.net/logs/access_log.%y%m%d" combined env=!dontlog 
  18.     ErrorLog "|/usr/local/cronolog/sbin/cronolog /data/website/sample.troodo.net/logs/error_log.%y%m%d" 
  19.     <Directory "/troodon/website/lyzabbix.troodo.net/htdocs"
  20.         DirectoryIndex index.wml index.html index.php 
  21.         AddHandler server-parsed .shtml 
  22.         AddType text/html .shtml 
  23.         AddHandler server-parsed .inc 
  24.         Options +Includes 
  25.         AllowOverride None 
  26.         Order allow,deny 
  27.         Allow from all 
  28.     </Directory> 
  29. </VirtualHost> 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章