成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

CentOS下的LAMP環(huán)境之虛擬主機

運維 系統運維
CentOS下的LAMP環(huán)境之虛擬主機:LAMP是說Linux-Apache-MySQL-PHP,LAMP網站架構是目前國際流行的Web框架。LAMP框架包括:Linux操作系統,Apache網絡服務器,MySQL數據庫,Perl、PHP或者Python編程語言。LAMP所有組成產品均是開源軟件,是國際上成熟的架構框架。本文講述的是CentOS下的LAMP環(huán)境之虛擬主機。

CentOS下的LAMP環(huán)境之虛擬主機(大綱

  四、配置虛擬主機及基本性能調優(yōu)

  1) 配置虛擬主機:

  1.   #vi /usr/local/apache2/conf/extra/httpd-vhosts.conf  
  2.  

  代碼:

  1.   NameVirtualHost *:80  
  2.  
  3.     
  4.  
  5.   ServerAdmin cnseek@gmail.com  
  6.  
  7.   DocumentRoot "/data/www/wwwroot/linuxtone.org"  
  8.  
  9.   ServerName www.linuxtone.org  
  10.  
  11.   ServerAlias bbs.linxutone.org  
  12.  
  13.   ErrorLog "logs/dummy-host.example.com-error_log"  
  14.  
  15.   CustomLog "|/usr/sbin/cronolog /data/logs/access_www.linuxtone.org.%Y%m%d"  
  16.  
  17.   combined  
  18.  

  2).基本性能調優(yōu)參考

  #vi /usr/local/apache2/conf/extra/httpd-default.conf

  復制內容到剪貼板

  代碼:

  1.   Timeout 15  
  2.  
  3.   KeepAlive Off  
  4.  
  5.   MaxKeepAliveRequests 50  
  6.  
  7.   KeepAliveTimeout 5  
  8.  
  9.   UseCanonicalName Off  
  10.  
  11.   AccessFileName .htaccess  
  12.  
  13.   ServerTokens Prod  
  14.  
  15.   ServerSignature Off  
  16.  
  17.   HostnameLookups Off  
  18.  
  19.   #vi /usr/local/apache2/conf/extra/httpd-mpm.conf  
  20.  

  代碼:  

  1.   ServerLimit 2000  
  2.  
  3.   StartServers 10  
  4.  
  5.   MinSpareServers 10  
  6.  
  7.   MaxSpareServers 15  
  8.  
  9.   MaxClients 2000  
  10.  
  11.   MaxRequestsPerChild 10000  
  12.  

  

  3).Apache日志處理相關問題匯總貼

  利用awstats分析網站日志:http://bbs.linuxtone.org/thread-56-1-1.html

  忽略不需要的日志配置參考具體請據據具體問題分析:

  LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\"

  \"%{User-Agent}i\"" combined

  #下面加入如下內容:

  代碼:

  1.   # filter the localhost visit  
  2.  
  3.   SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog  
  4.  
  5.   # filter some special directories  
  6.  
  7.   SetEnvIf Request_URI "^ZendPlatform.*$" dontlog  
  8.  
  9.   SetEnvIf Request_URI \.healthcheck\.html$ dontlog  
  10.  
  11.   SetEnvIf Remote_Addr "::1" dontlog  
  12.  
  13.   SetEnvIf Request_URI "\.getPing.php$" dontlog  
  14.  
  15.   SetEnvIf Request_URI "^/error\.html$" dontlog  
  16.  
  17.   SetEnvIf Request_URI "\.gif$" dontlog  
  18.  
  19.   SetEnvIf Request_URI "\.jpg$" dontlog  
  20.  
  21.   SetEnvIf Request_URI "\.css$" dontlog  
  22.  

  4). Apache防盜鏈(Apache防盜鏈相關問題匯總:http://bbs.linuxtone.org/thread-101-1-1.html)

  代碼:

  1.   RewriteEngine on  
  2.  
  3.   RewriteCond %{HTTP_REFERER} !^$  
  4.  
  5.   RewriteCond %{HTTP_REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]  
  6.  
  7.   RewriteRule \.(gif|jpg)$ http://網站域名/nolink.png [R,L]  

 

【編輯推薦】

  1. Ubuntu下LAMP的搭建
  2. Centos下搭建LAMP
  3. Linux下LAMP的安裝方法
責任編輯:zhaolei 來源: javaeye
相關推薦

2011-03-23 14:38:02

LAMP架設

2011-03-09 16:16:57

CentOSLAMP

2011-03-09 16:16:56

CentOSLAMP

2011-03-09 16:16:54

CentOSLAMP

2011-03-09 16:17:20

2011-03-09 16:28:25

2011-02-25 12:29:25

Proftpd

2017-08-15 15:24:21

2011-08-22 16:36:24

CentOSDirectAdmin

2013-04-02 11:21:52

Linux操作系統虛擬主機

2011-09-09 17:23:53

CentOSLAMPmysql

2011-08-16 15:16:26

UbuntuApache虛擬主機

2010-01-11 11:19:28

Apache配置

2010-07-01 13:35:51

vsftpd

2011-06-30 17:04:05

SEO

2010-03-29 16:17:07

Nginx虛擬主機

2013-05-27 09:34:16

2011-03-30 15:05:41

MRTG流量圖

2009-06-30 15:39:05

JSP虛擬主機

2011-03-10 15:44:18

CentOSLAMP安裝
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 成人免费视频网站在线观看 | 国产精品久久久久久久7电影 | 国产精品久久久久久久久免费桃花 | 99re在线视频观看 | 国产精品一区二区av | 久久99精品久久久久婷婷 | 少妇一区二区三区 | 亚洲欧美一区二区三区在线 | 亚洲人成人一区二区在线观看 | 日韩欧美中文字幕在线观看 | 国产一区二区三区四区 | 国产一区二区在线视频 | 亚洲三区在线观看 | 久久久久久久av | 中文字幕高清一区 | 国产精品久久久久久久久久久久冷 | 久久里面有精品 | 青青久在线视频 | 久久99视频这里只有精品 | 在线视频亚洲 | 成人久久久| 欧美日韩高清 | 四虎永久免费黄色影片 | 成人网在线观看 | 一级免费毛片 | 亚洲免费视频在线观看 | 久久中文字幕一区 | 中文天堂网 | 国产91久久久久久 | 午夜精品久久久久久久99黑人 | 天天插天天舔 | 国产剧情一区 | www.免费看片.com | 一级在线观看 | 韩国av一区二区 | 精品成人69xx.xyz | 国产精品成人一区二区三区夜夜夜 | 国产高清免费视频 | 黑人中文字幕一区二区三区 | 天天综合国产 | 成人精品免费视频 |