52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-10-3 10:29:29 | 芰閰脖 撣 |甇摨閬 |梯璅∪
啣  <Linux CENTOS 6 + Apache + mysql>
寞銝
1. vi /etc/httpd/httpd.conf2 O- g' f) x0 `4 ?7 s
2. 曉 # VirtualHost example:, `, }; C( e" ^9 L
  1. 嗡乩virtual server 閮剖,靘憒:
    # q) o2 k% }; K/ @" F% S
  2. #2014/10/02 add
    - Y, B! {- W' T* Y: [" J
  3. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫
    & C! Z  `+ ]" R6 K
  4.     ServerAdmin [email protected]
    2 o4 w9 ^4 E& D
  5.     DocumentRoot /home/coav4u/public_html, d' {) q  X0 M7 N
  6.     ServerName av4u.co
    5 D, F; q8 i/ r. e: g
  7.     ErrorLog logs/www.av4u.co-error_log) G7 p3 D1 C* K, v5 {1 }5 ~
  8.     CustomLog logs/www.av4u.co-access_log common$ g% k( f3 s" D& b' u
  9. </VirtualHost>
    : g1 v7 E( T8 M* ]$ l2 }
  10. <VirtualHost 192.168.1.12:80>
    : g% @3 r( [, B$ N: ^- g
  11.     ServerAdmin [email protected]
    - |/ L# C- l& ^! B% p; n8 K
  12.     DocumentRoot /home/coav4u/public_html
    , t0 }: Q5 a0 l2 J- J9 |
  13.     ServerName www.av4u.co
    4 o7 s8 O( k) L
  14.     ErrorLog logs/www.av4u.co-error_log! N0 B) i6 B% J% z6 p
  15.     CustomLog logs/www.av4u.co-access_log common  |5 e8 m9 u9 z5 f8 t
  16. </VirtualHost>
銴鋆賭誨蝣
    臬摰2 Domain
name (av4u.comwww.av4u.com)啣銝祉征,典隡潔瘥 nginx 閮剖蝔敺桅獄拐暺  }( _1 ~" R) g( H" J" [2 u* o' |
3. Apache 5 G+ h4 e( A' Q" e' R
    service httpd restart #隞叵oot頨怠   --->摰3 T( W1 R3 J4 q: s
   閮: service httpd start  #        

2 W9 t( I! V7 l) i8 B; R        service httpd start  #甇
- x% Z( x9 \8 o( J# h1 A0 \5 I& g寞鈭
* f# |( `  G" _" i/etc/httpd/conf.d/匐撱箔函瑼(閮剖銝virtual host)
5 e) b; z4 d# n! P( w8 K) [+ b/ R靘憒:
8 F9 r2 z! |% G! K8 Gvirtual1.conf1 X2 s' U3 [. A% F4 Z7 ^
  1. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫
    " `% U6 U/ `2 \* X
  2.     ServerAdmin [email protected], x0 b. x: n9 f( Y: ]! {1 ?
  3.     DocumentRoot /home/coav4u/public_html
    : Z, Q, d& o* l, r2 z3 O2 H8 n
  4.     ServerName av4u.co
    ' j& Y2 V+ w) J4 R, Q9 P8 q* H
  5.     ErrorLog logs/www.av4u.co-error_log
    + n. `9 @9 @% y, H6 i, I; e
  6.     CustomLog logs/www.av4u.co-access_log common
    6 j* ^) j% N7 W" f
  7. </VirtualHost>
銴鋆賭誨蝣
virtual2.conf
" B- M# Y4 e+ D
  1. <VirtualHost 192.168.1.12:80>
    9 z! z' `4 r+ O. Q) @1 _0 Q
  2.     ServerAdmin [email protected], C9 w' T* q" Z5 k8 P. T
  3.     DocumentRoot /home/coav4u/public_html* J2 m# ~, c9 v) z0 {
  4.     ServerName www.av4u.co* f$ x5 L; _8 Z; P! F
  5.     ErrorLog logs/www.av4u.co-error_log
    - V  E( s& |% W2 U6 [8 q& ^
  6.     CustomLog logs/www.av4u.co-access_log common
    1 D8 n3 s" U: u; D
  7. </VirtualHost>
銴鋆賭誨蝣
摮瑼嗅 httpd

" l! C% [8 Q  U/ V! U) ^雿臬箇 error:& Q4 ?( x& R# _) {
[warn] _default_ VirtualHost overlap on port 80, the first has precedence
4 I+ n  v' H5 T/ Z! M# M( r0 S2 [% |SOL:
8 B4 J7 i# B, H望 /etc/httpd/conf/httpd.conf NameVirtualHost *:80 virtual1.confvirtual2.conf 折質身摰 <VirtualHost 192.168.1.12:80> 銝寥,甇蝣箇閮剖:+ h6 o" ^3 C% Q/ J
httpd.conf virtual1.confvirtual2.conf(砌蜓璈閮剖瑼)銝舫賜 *:80 撠望舫賜 192.168.1.12:80
0 p+ u3 a" U4 m# @httpd.conf ===> NameVirtualHost *:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost *:80>  
# d  N8 C( o! Q* L( Y/ bhttpd.conf ===> NameVirtualHost 192.168.1.12:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost 192.168.1.12:80>& t, k; z; _( N/ j5 q
& R4 |. G$ i! W8 \; M# t
8 I' [) r- x; s# Q5 Q1 A+ A9 Q; h

4 C3 k! |1 O" X+ o" x

雿輻券

祉蝛閬

BT蝳

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

QQ|撠暺撅||52AV璈A

GMT+8, 2024-11-28 23:05 , Processed in 0.069822 second(s), 17 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵