52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-10-3 10:29:29 | 芰閰脖 撣 |摨閬 |梯璅∪
啣  <Linux CENTOS 6 + Apache + mysql>
寞銝
1. vi /etc/httpd/httpd.conf0 s5 y5 f+ o7 `- \: E
2. 曉 # VirtualHost example:
8 m9 b/ M( J! W% q& p5 o" |4 s
  1. 嗡乩virtual server 閮剖,靘憒:
    . m' _5 ]* @6 P# u: \. G
  2. #2014/10/02 add$ x0 _3 w" C# c, `; T
  3. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫/ t6 u6 N0 L0 L5 `8 k) D1 N
  4.     ServerAdmin [email protected]
    + d3 I# o8 O' n
  5.     DocumentRoot /home/coav4u/public_html. Y) D) J. T! U6 @
  6.     ServerName av4u.co! I& N+ u, X3 P, e/ C8 H. w
  7.     ErrorLog logs/www.av4u.co-error_log
    7 f: v3 o9 K& G7 o/ q* z
  8.     CustomLog logs/www.av4u.co-access_log common' Q) H) q8 C' f8 t$ g
  9. </VirtualHost>5 {+ a$ K- l, V& c! e
  10. <VirtualHost 192.168.1.12:80>
    . F8 B+ \5 _, G# j
  11.     ServerAdmin [email protected]* {9 s$ p# h2 d9 Z. V* a; q
  12.     DocumentRoot /home/coav4u/public_html9 X3 H  h# _/ l* }
  13.     ServerName www.av4u.co
    ( s- G8 w- t3 a2 Y. ]6 v* _6 u; t
  14.     ErrorLog logs/www.av4u.co-error_log. Z. E  j, F: u1 K; Y: @
  15.     CustomLog logs/www.av4u.co-access_log common
    ( e% \0 q) c9 O1 H0 A
  16. </VirtualHost>
銴鋆賭誨蝣
    臬摰2 Domain
name (av4u.comwww.av4u.com)啣銝祉征,典隡潔瘥 nginx 閮剖蝔敺桅獄拐暺
& Y( N- E3 l4 w: s3 H) [5 E- j3. Apache 5 M0 x' S- j1 v& o
    service httpd restart #隞叵oot頨怠   --->摰5 A" K1 O8 @- I! X$ G3 _' X& Y
   閮: service httpd start  #        
# ?, o4 O; h; P% n5 ]+ _$ S$ s; L
        service httpd start  #甇
3 @7 r3 `7 d/ {8 H% V& W+ p; M寞鈭
$ I& E6 Q' A  S9 q/etc/httpd/conf.d/匐撱箔函瑼(閮剖銝virtual host)
3 G9 L! Q( u0 ~6 G靘憒:
: v4 v' v# j0 `virtual1.conf
5 K; M% n8 X. ^; ?) s# m, M
  1. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫5 d  C. b: }6 @$ G
  2.     ServerAdmin [email protected]
    : X0 Q; K; T0 k& t- i
  3.     DocumentRoot /home/coav4u/public_html
    3 V: t- t1 _: i* a
  4.     ServerName av4u.co
    * V8 ^; c' U1 ]
  5.     ErrorLog logs/www.av4u.co-error_log
    5 N: q' W2 F$ {
  6.     CustomLog logs/www.av4u.co-access_log common
    ; M" h% r, c' x- w- |$ }* v
  7. </VirtualHost>
銴鋆賭誨蝣
virtual2.conf
; z5 ^* X# X# d+ Y) u( S- g* I
  1. <VirtualHost 192.168.1.12:80>4 V4 e4 ?& A% P0 D6 [/ E  N
  2.     ServerAdmin [email protected]
    ; ^" C" F8 T6 J1 u
  3.     DocumentRoot /home/coav4u/public_html4 S) p% y" {/ @  X4 i8 E5 X5 F/ y5 S
  4.     ServerName www.av4u.co5 A* S  @' k, {$ y( _
  5.     ErrorLog logs/www.av4u.co-error_log
    , c5 ?4 o1 S' S) S) r
  6.     CustomLog logs/www.av4u.co-access_log common
    % f8 l, N' }$ P/ E8 L' }9 J' w4 r
  7. </VirtualHost>
銴鋆賭誨蝣
摮瑼嗅 httpd

6 Q  Q( m7 r/ q' o' p# x8 c雿臬箇 error:
/ D& G! {. m- _) B4 N$ e4 B [warn] _default_ VirtualHost overlap on port 80, the first has precedence
* }- R: B! E3 }, h6 \: CSOL:
7 G! [  Z% {6 v! T. N2 B% W/ x7 a望 /etc/httpd/conf/httpd.conf NameVirtualHost *:80 virtual1.confvirtual2.conf 折質身摰 <VirtualHost 192.168.1.12:80> 銝寥,甇蝣箇閮剖:
7 n% b5 p" d( G! Nhttpd.conf virtual1.confvirtual2.conf(砌蜓璈閮剖瑼)銝舫賜 *:80 撠望舫賜 192.168.1.12:80 & [3 r' b7 l9 Q* L3 J
httpd.conf ===> NameVirtualHost *:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost *:80>   6 }# ^) ]/ P7 ~( [5 a! Q, Z; R
httpd.conf ===> NameVirtualHost 192.168.1.12:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost 192.168.1.12:80>. j( W( \9 h9 z
0 T* ]" F) H3 f; b( A
2 F  _8 @* p! k& m6 ?7 B
  [; h/ [6 L& \# f

雿輻券

祉蝛閬

BT蝳

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

QQ|撠暺撅||52AV璈A

GMT+8, 2024-12-26 16:27 , Processed in 0.063999 second(s), 16 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵