52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-10-3 10:29:29 | 芰閰脖 撣 |摨閬 |梯璅∪
啣  <Linux CENTOS 6 + Apache + mysql>
寞銝
1. vi /etc/httpd/httpd.conf$ K( `- X  P4 H; Y: F
2. 曉 # VirtualHost example:
, H6 j4 n7 z( T1 D, a# L
  1. 嗡乩virtual server 閮剖,靘憒:
    . k* b9 z- U8 V
  2. #2014/10/02 add' y# I  s+ Y  v+ P7 ?  `
  3. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫1 F6 U/ m2 l& k4 c
  4.     ServerAdmin [email protected]
    ' Q  t8 e! s6 G8 q( N# i
  5.     DocumentRoot /home/coav4u/public_html
    7 ?/ k1 y2 p+ P8 k
  6.     ServerName av4u.co
    8 Y1 q) X5 C( c6 M
  7.     ErrorLog logs/www.av4u.co-error_log8 i1 W; ^& K7 f- G: B
  8.     CustomLog logs/www.av4u.co-access_log common  j6 C: `8 R8 Z: D
  9. </VirtualHost>. u; I/ p) r7 q  `# I( A
  10. <VirtualHost 192.168.1.12:80>
    - Y& U/ ?. a! z8 f* M$ r. s
  11.     ServerAdmin [email protected]
    , }6 Q% x" f" E2 [( m, p6 v
  12.     DocumentRoot /home/coav4u/public_html3 j- g) r6 y% C2 x; V
  13.     ServerName www.av4u.co' }" @9 J$ c% p" {; N# q; Z
  14.     ErrorLog logs/www.av4u.co-error_log
    " u$ H+ Z5 X* P' v3 K' s8 g8 p0 c, q$ j
  15.     CustomLog logs/www.av4u.co-access_log common# U. S8 V* P1 n, P* ?
  16. </VirtualHost>
銴鋆賭誨蝣
    臬摰2 Domain
name (av4u.comwww.av4u.com)啣銝祉征,典隡潔瘥 nginx 閮剖蝔敺桅獄拐暺
2 `2 {& y* V( n- L5 J% L3. Apache / P4 q9 d2 S. C5 ]4 S" a2 v
    service httpd restart #隞叵oot頨怠   --->摰  m, _2 O6 r  K) z. M' p# Y3 P, y
   閮: service httpd start  #        
  p6 y3 v9 K5 P  G- R& b: k  w
        service httpd start  #甇; t% F0 k! K5 o/ S3 N! {% `2 N4 ?
寞鈭
- \1 f  @' Q5 m- F/etc/httpd/conf.d/匐撱箔函瑼(閮剖銝virtual host)! \6 D1 V1 R2 ]4 B
靘憒:   n  Y0 ^# I. Z7 J2 b" {8 \$ @! e
virtual1.conf. R. I1 O% M% p& R2 v5 x
  1. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫
    8 k. I( {+ o; [( G" M- V5 X
  2.     ServerAdmin [email protected]
    , @& ]$ J+ N: ?- d5 ?1 g
  3.     DocumentRoot /home/coav4u/public_html
    , X" \6 Z; X+ p8 z. t6 x/ u( {% p& x
  4.     ServerName av4u.co' l: Y( l% [: d# S: F% ?7 Z
  5.     ErrorLog logs/www.av4u.co-error_log0 h# d+ v! K0 l6 C5 T" J2 o: V- \' p
  6.     CustomLog logs/www.av4u.co-access_log common
    * B4 I# ]8 Q* O  _
  7. </VirtualHost>
銴鋆賭誨蝣
virtual2.conf

/ l8 w# D* o% O% w, V
  1. <VirtualHost 192.168.1.12:80>- `7 U0 R) ~/ f- K
  2.     ServerAdmin [email protected]
    8 `( d2 r; [* z
  3.     DocumentRoot /home/coav4u/public_html6 }7 T; \# i  Y8 V# q
  4.     ServerName www.av4u.co' G7 Z% I7 P2 J$ @) @5 e2 f: s
  5.     ErrorLog logs/www.av4u.co-error_log+ `4 X2 ~4 l5 p
  6.     CustomLog logs/www.av4u.co-access_log common
    - _) N/ Z9 a. k. b9 H
  7. </VirtualHost>
銴鋆賭誨蝣
摮瑼嗅 httpd

9 S1 {& S) F; @4 `1 u' C0 u1 O雿臬箇 error:
+ d5 E6 [0 Q% W/ Y# b1 [: O [warn] _default_ VirtualHost overlap on port 80, the first has precedence3 C3 K) M+ S- e, Z) Y2 o8 m
SOL:
1 ^/ l2 ^( H9 ?. E( Z% c望 /etc/httpd/conf/httpd.conf NameVirtualHost *:80 virtual1.confvirtual2.conf 折質身摰 <VirtualHost 192.168.1.12:80> 銝寥,甇蝣箇閮剖:
. z4 [. s7 ?7 ?: o5 F8 ?2 Khttpd.conf virtual1.confvirtual2.conf(砌蜓璈閮剖瑼)銝舫賜 *:80 撠望舫賜 192.168.1.12:80
$ Z1 b8 l; t, V& hhttpd.conf ===> NameVirtualHost *:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost *:80>  
* ]. X' Q! T" Q3 }9 h4 @9 Phttpd.conf ===> NameVirtualHost 192.168.1.12:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost 192.168.1.12:80>
2 \8 A  i5 g, W3 O. o

. j4 A$ C  r/ u+ c1 w2 i7 p" H% n  V2 g* A# [

. p7 f4 c2 g1 Z! g! U

雿輻券

祉蝛閬

BT蝳

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

QQ|撠暺撅||52AV璈A

GMT+8, 2024-11-29 01:35 , Processed in 0.053022 second(s), 16 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵