52AV璈A|52AV.ONE

 曉撖蝣
 蝡唾酉
敹急瑕
  • av隢憯BBS
  • 璈A
  • 芣瑟憭瘚
  • 鞎澆
  • 52av鋆貉摰
  • 銝剜-銝剖銝餅
  • 伐AI璁函移瘛怠伐
     
亦: 5308|敺: 0
銝銝銝駁 銝銝銝駁

[蝬脤隡箸沘 Apache 憒雿閮剖憭砌撩(Virtual Server)

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-10-3 10:29:29 | 芰閰脖 撣 |甇摨閬 |梯璅∪
啣  <Linux CENTOS 6 + Apache + mysql>
寞銝
1. vi /etc/httpd/httpd.conf
5 `+ k% w6 k) Q9 B+ U8 i8 S8 x  q$ R* x2. 曉 # VirtualHost example:
  1. 嗡乩virtual server 閮剖,靘憒:
  2. #2014/10/02 add
  3. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫
  4.     ServerAdmin root@av4u.com
  5.     DocumentRoot /home/coav4u/public_html
  6.     ServerName av4u.co
  7.     ErrorLog logs/www.av4u.co-error_log
  8.     CustomLog logs/www.av4u.co-access_log common
  9. </VirtualHost>
  10. <VirtualHost 192.168.1.12:80>
  11.     ServerAdmin root@av4u.com
  12.     DocumentRoot /home/coav4u/public_html
  13.     ServerName www.av4u.co
  14.     ErrorLog logs/www.av4u.co-error_log
  15.     CustomLog logs/www.av4u.co-access_log common
  16. </VirtualHost>
銴鋆賭誨蝣
    臬摰2 Domain
name (av4u.comwww.av4u.com)啣銝祉征,典隡潔瘥 nginx 閮剖蝔敺桅獄拐暺
) ~' P/ @/ t* o3 N% U/ H3. Apache
7 s1 ]# I  \+ @% t3 K) F    service httpd restart #隞叵oot頨怠   --->摰
! O6 ?+ M" i4 {3 p* M0 U   閮: service httpd start  #        
9 u) ?  g0 l/ ~. |: C3 V$ Y. W
        service httpd start  #甇' a( u& z/ n1 x
寞鈭
9 i8 B$ U6 x% [  k/ [1 A1 X: I/etc/httpd/conf.d/匐撱箔函瑼(閮剖銝virtual host)2 b; t9 y* J3 h! {7 X
靘憒: $ q& d/ e: k5 e! D' P
virtual1.conf
( d7 L8 v9 l% U: s" n3 M: u9 h
  1. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫
  2.     ServerAdmin root@av4u.com
  3.     DocumentRoot /home/coav4u/public_html
  4.     ServerName av4u.co
  5.     ErrorLog logs/www.av4u.co-error_log
  6.     CustomLog logs/www.av4u.co-access_log common
  7. </VirtualHost>
銴鋆賭誨蝣
virtual2.conf

; p# s* S2 m" y
  1. <VirtualHost 192.168.1.12:80>
  2.     ServerAdmin root@av4u.com
  3.     DocumentRoot /home/coav4u/public_html
  4.     ServerName www.av4u.co
  5.     ErrorLog logs/www.av4u.co-error_log
  6.     CustomLog logs/www.av4u.co-access_log common
  7. </VirtualHost>
銴鋆賭誨蝣
摮瑼嗅 httpd
/ T1 d% s+ v4 h& y: g4 R
雿臬箇 error:
( f4 R6 k- @( D: ~ [warn] _default_ VirtualHost overlap on port 80, the first has precedence! J* ^2 p) b3 L& d  i/ l! V  I
SOL:
! l( ~+ g' G$ `: l! G望 /etc/httpd/conf/httpd.conf NameVirtualHost *:80 virtual1.confvirtual2.conf 折質身摰 <VirtualHost 192.168.1.12:80> 銝寥,甇蝣箇閮剖:
6 q, P4 Q+ D7 ]) h1 x6 Ohttpd.conf virtual1.confvirtual2.conf(砌蜓璈閮剖瑼)銝舫賜 *:80 撠望舫賜 192.168.1.12:80 + E: J+ w3 ]  B+ u4 z. \; @  Y% `1 a
httpd.conf ===> NameVirtualHost *:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost *:80>   ' ^1 S  U& o1 |2 d: F4 ^$ j
httpd.conf ===> NameVirtualHost 192.168.1.12:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost 192.168.1.12:80>
. O" x6 \& |; ^; x& _
& S" f$ i& h9 q" Z/ g# d8 M3 [) T
, x5 G) T5 w# w( c5 M
9 \5 B1 w0 m; l0 ?# ?8 h; U

雿輻券

祉蝛閬

撠蝝詨

砍憛批捆靘餉衣雯頝臬批捆蝝颲行粹嗥蝬脩嚗摰撟湔遛嚗嚗甇脖誑銝嗅啣摰嗆摰撟湧翩鈭箏ㄚ孵舫脣伐銝憿亙祉璇甈橘芣遛18甇 雓蝯脣亦閬賬粹脩芣遛18甇脖芣撟渡雯閬賜雯頝臭嗥批捆鞈閮嚗撱箄降典舫脰蝬脰楝批捆蝝蝯蝜ICRA蝝摰鋆閮剖 (粹蝯行霅 祉蝬脣銝蝝瘛函隢憯啣嚗祉閮剜蝞∠)

QQ|撠暺撅||52AV璈A

GMT+8, 2025-10-21 23:33 , Processed in 0.060333 second(s), 17 queries .

蝯∠.撱

52avtv@gmail.com | QQ:2405733034     since 2015-01

鋆貉憒 敹恍敺 餈銵