52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-10-3 10:29:29 | 芰閰脖 撣 |摨閬 |梯璅∪
啣  <Linux CENTOS 6 + Apache + mysql>
寞銝
1. vi /etc/httpd/httpd.conf
/ W# Y. p/ b2 D7 ]3 E2 d0 F. Y8 k2. 曉 # VirtualHost example:
/ V5 P+ u+ C2 E) j% N
  1. 嗡乩virtual server 閮剖,靘憒:& P4 L! E; w$ O( @
  2. #2014/10/02 add: ?* a: w: X7 \7 H. v
  3. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫
    7 K; }, h5 g3 k- t- `+ ]
  4.     ServerAdmin [email protected]& e  H& c  B; C
  5.     DocumentRoot /home/coav4u/public_html
    1 @% z% l5 d6 c; W
  6.     ServerName av4u.co( t& B3 O' W2 p9 h7 m5 b
  7.     ErrorLog logs/www.av4u.co-error_log
    ' K( X; h/ o: Q) k  M
  8.     CustomLog logs/www.av4u.co-access_log common/ d* u9 y$ `3 w. i7 K
  9. </VirtualHost>+ J% B% b6 v! R& `- m% w' J
  10. <VirtualHost 192.168.1.12:80>
    - u9 a, F5 ^6 J0 f" y  [
  11.     ServerAdmin [email protected]/ k# [& ?# N7 o8 A6 b0 w1 p3 `; ~
  12.     DocumentRoot /home/coav4u/public_html- R' I3 d2 Z; @8 Q3 k- m* N* |+ b
  13.     ServerName www.av4u.co8 X5 e! i1 x, O, _
  14.     ErrorLog logs/www.av4u.co-error_log4 a! n; Q. \0 z: P: b; }
  15.     CustomLog logs/www.av4u.co-access_log common
    8 u2 `' r# a6 M" F( j0 `# \" [7 _
  16. </VirtualHost>
銴鋆賭誨蝣
    臬摰2 Domain
name (av4u.comwww.av4u.com)啣銝祉征,典隡潔瘥 nginx 閮剖蝔敺桅獄拐暺
1 J- t+ b3 ~+ T0 |) a5 X) K+ A3. Apache 0 G% r1 d, O- C! ~* a: C% V% Z4 O
    service httpd restart #隞叵oot頨怠   --->摰
! r" C  C0 \& \) _! d   閮: service httpd start  #        
* M. M" x! T2 r
        service httpd start  #甇& q/ L7 {' x/ |$ K9 i1 H+ i4 A
寞鈭( X! V  b5 B- E4 ~6 M+ V$ ?' O
/etc/httpd/conf.d/匐撱箔函瑼(閮剖銝virtual host)
" k( |: g# U( X靘憒:
: P8 ]6 F. i! B" S% @6 bvirtual1.conf
9 w- C8 ^' [: G& x. `
  1. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫- \) }; N* |6 E4 G  t! Q% {
  2.     ServerAdmin [email protected]" N! L2 ^0 Z# `3 |
  3.     DocumentRoot /home/coav4u/public_html1 H6 P  P+ ?- f/ M
  4.     ServerName av4u.co
    9 D0 y7 q' J6 Q" h& Z7 `; Q* ^+ Q8 K
  5.     ErrorLog logs/www.av4u.co-error_log
    / `( H+ F( H0 I' ?6 z( ^  Y8 Z
  6.     CustomLog logs/www.av4u.co-access_log common, m( C9 e  q* N2 ^* s- F' a
  7. </VirtualHost>
銴鋆賭誨蝣
virtual2.conf

4 W, X# F) ~- `2 w
  1. <VirtualHost 192.168.1.12:80>
    & p$ u+ B: n/ q7 r
  2.     ServerAdmin [email protected]: q% h3 M1 N3 k
  3.     DocumentRoot /home/coav4u/public_html
    5 J5 ?; X" e( U2 b/ P+ Z' [
  4.     ServerName www.av4u.co. ?* a3 |/ s) G. Z  }
  5.     ErrorLog logs/www.av4u.co-error_log
    3 t. d+ C0 R2 Y9 O5 Z
  6.     CustomLog logs/www.av4u.co-access_log common% H  D* I$ q" d: U8 {# {
  7. </VirtualHost>
銴鋆賭誨蝣
摮瑼嗅 httpd

4 ^) ]* ^7 H5 U( C2 ~" A" M% R) p雿臬箇 error:
% |% x0 {3 m# g [warn] _default_ VirtualHost overlap on port 80, the first has precedence$ ]5 t' F* R8 {0 x! ]2 f5 S% z# p
SOL:
: u( U8 k0 |4 t& @" h  {望 /etc/httpd/conf/httpd.conf NameVirtualHost *:80 virtual1.confvirtual2.conf 折質身摰 <VirtualHost 192.168.1.12:80> 銝寥,甇蝣箇閮剖:
1 _$ N/ m! ~( G" f% Vhttpd.conf virtual1.confvirtual2.conf(砌蜓璈閮剖瑼)銝舫賜 *:80 撠望舫賜 192.168.1.12:80 4 }+ ~& Y9 i; m9 t, w5 p) g% D, |
httpd.conf ===> NameVirtualHost *:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost *:80>   % m7 F6 J5 r. i; M- _$ ~
httpd.conf ===> NameVirtualHost 192.168.1.12:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost 192.168.1.12:80>3 s6 H- s( v: z/ V4 b8 w% H+ w

# y6 f4 J. U+ O( Y
$ [. H) R( K, M% R( s1 q: n

) J7 x3 L' H0 j# |: \

雿輻券

祉蝛閬

BT蝳

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

QQ|撠暺撅||52AV璈A

GMT+8, 2024-11-22 08:59 , Processed in 0.065749 second(s), 16 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵