52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-10-3 10:29:29 | 芰閰脖 撣 |摨閬 |梯璅∪
啣  <Linux CENTOS 6 + Apache + mysql>
寞銝
1. vi /etc/httpd/httpd.conf! U& k( z2 d3 A+ ~# F" L
2. 曉 # VirtualHost example:
  k. I) r3 I/ w/ I; u. W& R
  1. 嗡乩virtual server 閮剖,靘憒:
    9 M: w4 M! G2 D
  2. #2014/10/02 add' P& u* X; h' C% h( y" b
  3. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫# ]/ @) p5 Z" Y$ C8 X
  4.     ServerAdmin [email protected]" e2 T3 P) ^  g
  5.     DocumentRoot /home/coav4u/public_html
    , h; w: @, P4 z  o$ c. J
  6.     ServerName av4u.co3 u, Y  A4 F' W1 Z
  7.     ErrorLog logs/www.av4u.co-error_log* f; ~! b' t1 m1 r$ R
  8.     CustomLog logs/www.av4u.co-access_log common: r* Y6 T; c  m. B$ p+ d) Z
  9. </VirtualHost>& i+ y/ @( n& |& l0 M: @7 j
  10. <VirtualHost 192.168.1.12:80>
    - j7 M- I& V. G; [" b( Y
  11.     ServerAdmin [email protected]
    + i' @* X7 F2 q7 K2 U  S9 q
  12.     DocumentRoot /home/coav4u/public_html
    3 p$ [( R5 w: z( _! O
  13.     ServerName www.av4u.co
    ! t& p; z  q" ^3 {
  14.     ErrorLog logs/www.av4u.co-error_log* l! S6 `. k* ~" {0 U8 c! }
  15.     CustomLog logs/www.av4u.co-access_log common
    , X! m9 l9 s  w( F2 Q0 }9 L
  16. </VirtualHost>
銴鋆賭誨蝣
    臬摰2 Domain
name (av4u.comwww.av4u.com)啣銝祉征,典隡潔瘥 nginx 閮剖蝔敺桅獄拐暺
; ?6 \  Z% M# q3. Apache
; {) A- t) h" I2 p) a: G    service httpd restart #隞叵oot頨怠   --->摰. @' c$ c  M; h
   閮: service httpd start  #        
# `$ f& n1 ^0 ~! f1 ]
        service httpd start  #甇
9 O. b6 U# U0 b0 |( D0 ], f寞鈭8 m6 l; g" b9 J$ }* L9 ?0 x  T
/etc/httpd/conf.d/匐撱箔函瑼(閮剖銝virtual host)0 l: W0 @8 P+ p; a8 P
靘憒: $ m0 @# @( p& p" s; i" o
virtual1.conf6 N6 r- I* n5 P% R; _" A( J8 b% O7 e& L
  1. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫+ v- R' F* X( `, {9 Y
  2.     ServerAdmin [email protected]
    1 X5 K: w/ Q& L
  3.     DocumentRoot /home/coav4u/public_html' q* R. }" M3 e+ @" |% p" l2 X1 o' H/ u
  4.     ServerName av4u.co
    ! Y5 o! k9 m" u% h2 M! `; n
  5.     ErrorLog logs/www.av4u.co-error_log7 n, |- d9 i8 E% ]. u; h, b
  6.     CustomLog logs/www.av4u.co-access_log common' c4 P# {5 c9 Y: x/ \( ?' f
  7. </VirtualHost>
銴鋆賭誨蝣
virtual2.conf

7 }& H4 l' P+ X( O) o- r9 J
  1. <VirtualHost 192.168.1.12:80>
    3 N! V, {9 Y+ P1 p" _( [
  2.     ServerAdmin [email protected]! d( _6 M$ x2 r" f9 @% N
  3.     DocumentRoot /home/coav4u/public_html% M" h/ n- e& H$ D5 ~
  4.     ServerName www.av4u.co; V+ @3 i2 {# j5 C# ?9 B* V! W; z
  5.     ErrorLog logs/www.av4u.co-error_log8 X9 W% I3 k& F5 l6 a3 }+ ]
  6.     CustomLog logs/www.av4u.co-access_log common. \  @; Y' S4 ^
  7. </VirtualHost>
銴鋆賭誨蝣
摮瑼嗅 httpd

! C5 ]- ]# Y) n' x雿臬箇 error:
. C2 s) A, G' o+ }6 a3 T [warn] _default_ VirtualHost overlap on port 80, the first has precedence) [  T* v  Y4 ]( ^0 M  f" k
SOL:
/ F/ z6 L& X. @0 g9 x! i望 /etc/httpd/conf/httpd.conf NameVirtualHost *:80 virtual1.confvirtual2.conf 折質身摰 <VirtualHost 192.168.1.12:80> 銝寥,甇蝣箇閮剖:
5 R: i" H9 D( L9 lhttpd.conf virtual1.confvirtual2.conf(砌蜓璈閮剖瑼)銝舫賜 *:80 撠望舫賜 192.168.1.12:80 . L8 a4 _9 F( f+ c+ {& j9 V
httpd.conf ===> NameVirtualHost *:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost *:80>     m) o, m+ ]" _  R% w6 k
httpd.conf ===> NameVirtualHost 192.168.1.12:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost 192.168.1.12:80>! g" e4 S* X& J6 u+ {
2 l$ C6 V8 Q7 [2 z3 Y$ g* I8 j3 g9 v

# `2 n2 d+ v$ v6 b  t
/ k2 w: U* j" z0 z9 u  G

雿輻券

祉蝛閬

BT蝳

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

QQ|撠暺撅||52AV璈A

GMT+8, 2024-6-11 03:12 , Processed in 0.055509 second(s), 16 queries .

蝯∠.撱

[email protected] | QQ:2405733034     since 2015-01

鋆貉憒 敹恍敺 餈銵