52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-10-3 10:29:29 | 芰閰脖 撣 |摨閬 |梯璅∪
啣  <Linux CENTOS 6 + Apache + mysql>
寞銝
1. vi /etc/httpd/httpd.conf
3 [, _& J4 Y1 L& X# e2. 曉 # VirtualHost example:2 }$ [, {7 h- M6 H% |
  1. 嗡乩virtual server 閮剖,靘憒:
    - s" i% H! x! C  N* p9 I4 i3 f5 m
  2. #2014/10/02 add0 a% R# M, \9 ]0 t+ P0 l
  3. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫
    ( k' f6 ^: o3 V9 R* m9 r. _
  4.     ServerAdmin [email protected]
    " \7 @" O" M$ v# T
  5.     DocumentRoot /home/coav4u/public_html2 a/ `) v% e9 U
  6.     ServerName av4u.co8 U( O+ c$ V3 U5 J0 m6 c0 ?0 b3 a
  7.     ErrorLog logs/www.av4u.co-error_log
    . S2 \" y+ p$ `/ A) B( p; s+ W
  8.     CustomLog logs/www.av4u.co-access_log common2 N) ]1 m: R/ Y. j
  9. </VirtualHost>  o- d, D+ H, l  c8 A
  10. <VirtualHost 192.168.1.12:80>
    # [% a6 Z. v1 k- c( w2 j) ~
  11.     ServerAdmin [email protected]2 M; E1 p5 V! `; U5 {9 C
  12.     DocumentRoot /home/coav4u/public_html9 [2 e. {$ J0 t& J! ~2 _3 Q6 O
  13.     ServerName www.av4u.co' n$ P& q7 O' }; z  R
  14.     ErrorLog logs/www.av4u.co-error_log1 {% c, J& i$ q% B7 }  K; V
  15.     CustomLog logs/www.av4u.co-access_log common! ?! G* ?2 i, F2 u5 X
  16. </VirtualHost>
銴鋆賭誨蝣
    臬摰2 Domain
name (av4u.comwww.av4u.com)啣銝祉征,典隡潔瘥 nginx 閮剖蝔敺桅獄拐暺
9 s, ^( b3 ?0 t9 p) u$ V# ?- x3. Apache 7 v) \% m; h- f' w( V
    service httpd restart #隞叵oot頨怠   --->摰
5 J6 D' X1 Z% t  x, b" z   閮: service httpd start  #        
$ M/ ^; g; O4 D4 m# |4 v4 L
        service httpd start  #甇  i$ U; V# y' y  w, T& E5 X, [4 g
寞鈭3 r" M0 C/ }% K% X5 v) a) c4 w9 \4 U
/etc/httpd/conf.d/匐撱箔函瑼(閮剖銝virtual host); B: T+ I) d5 L- h
靘憒:
* L  ^& p/ v4 v/ G4 [- w( ^! pvirtual1.conf  l# r& j# r/ e4 {3 C
  1. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫
    9 b, ]6 G9 g8 ~# ^* O
  2.     ServerAdmin [email protected]2 Y* \, K$ `/ E" J+ I
  3.     DocumentRoot /home/coav4u/public_html4 g1 h- u% k$ E; I0 _* l
  4.     ServerName av4u.co9 [6 C; A" @3 [- i/ Q; R# q1 D
  5.     ErrorLog logs/www.av4u.co-error_log
    ! o& S" S' Z1 A2 {
  6.     CustomLog logs/www.av4u.co-access_log common
    , ]! W1 f7 ~) f9 @2 A- [
  7. </VirtualHost>
銴鋆賭誨蝣
virtual2.conf

8 V, S9 E5 [( J! a1 \' }4 B
  1. <VirtualHost 192.168.1.12:80>2 |! l  j* I+ s' U0 H" r# _. }  a% _
  2.     ServerAdmin [email protected]1 K- r. R7 f( }4 L9 H6 _* J6 p
  3.     DocumentRoot /home/coav4u/public_html
    - I) @( p& j6 T! H8 X
  4.     ServerName www.av4u.co
    0 V: @( D$ q3 s' h$ [7 b, T
  5.     ErrorLog logs/www.av4u.co-error_log
    4 e" J' Y) K2 g
  6.     CustomLog logs/www.av4u.co-access_log common
    & x! K' K. M" s) a
  7. </VirtualHost>
銴鋆賭誨蝣
摮瑼嗅 httpd
0 U' Z. G! N6 s( ?. x
雿臬箇 error:6 O0 l4 \0 E# D
[warn] _default_ VirtualHost overlap on port 80, the first has precedence
- H6 f( _2 \- m! \8 d, v: |* o' ASOL:3 y7 I, Y" \8 z
望 /etc/httpd/conf/httpd.conf NameVirtualHost *:80 virtual1.confvirtual2.conf 折質身摰 <VirtualHost 192.168.1.12:80> 銝寥,甇蝣箇閮剖:* C' F4 [& y% r- R" h
httpd.conf virtual1.confvirtual2.conf(砌蜓璈閮剖瑼)銝舫賜 *:80 撠望舫賜 192.168.1.12:80 % H2 v7 @" K: h! ?
httpd.conf ===> NameVirtualHost *:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost *:80>  
7 n9 P: y$ O# C/ ?) Q& ~httpd.conf ===> NameVirtualHost 192.168.1.12:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost 192.168.1.12:80>
/ R. x% W/ x0 Y8 l( _! J
) u9 H. ?3 o0 c# j* z4 {1 ~
( ^* \- z. `2 R: D1 c6 j
( {/ }7 H% I- N

雿輻券

祉蝛閬

BT蝳

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

QQ|撠暺撅||52AV璈A

GMT+8, 2024-10-5 15:33 , Processed in 0.066269 second(s), 16 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵