52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-10-3 10:29:29 | 芰閰脖 撣 |摨閬 |梯璅∪
啣  <Linux CENTOS 6 + Apache + mysql>
寞銝
1. vi /etc/httpd/httpd.conf
; V" j. r" {3 x5 M2. 曉 # VirtualHost example:
6 _* h5 q6 n; m3 {' f6 N" U
  1. 嗡乩virtual server 閮剖,靘憒:# V0 \, U0 |/ ]% R) r
  2. #2014/10/02 add% e( C( S  ?$ H; r  s3 a
  3. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫+ I* p6 t6 s" u; t3 X2 B
  4.     ServerAdmin [email protected]
    7 W; v7 ^" Q! i, ^
  5.     DocumentRoot /home/coav4u/public_html
    5 t, P9 o. a- e5 _8 ~, \5 x
  6.     ServerName av4u.co' c  W5 e7 {  u, a
  7.     ErrorLog logs/www.av4u.co-error_log( l+ W+ I5 o* ]+ y, A
  8.     CustomLog logs/www.av4u.co-access_log common
    ) Y+ ]" ?/ _% f8 w
  9. </VirtualHost>+ L2 y- Q) M( y' F/ [4 x! {
  10. <VirtualHost 192.168.1.12:80>' F' k; l9 \- v/ S
  11.     ServerAdmin [email protected]  N# t! b- t! d. e. B% c+ S
  12.     DocumentRoot /home/coav4u/public_html
    : k3 O0 ?- i* c7 G" G2 I
  13.     ServerName www.av4u.co
    2 Y; S% a6 `3 e
  14.     ErrorLog logs/www.av4u.co-error_log  F8 M& ^; p# j( y
  15.     CustomLog logs/www.av4u.co-access_log common) b8 }% a/ L+ N: x) [
  16. </VirtualHost>
銴鋆賭誨蝣
    臬摰2 Domain
name (av4u.comwww.av4u.com)啣銝祉征,典隡潔瘥 nginx 閮剖蝔敺桅獄拐暺
1 t$ p/ p/ ~" ^3. Apache
0 M1 f) X$ c  U6 g0 G    service httpd restart #隞叵oot頨怠   --->摰
+ ^3 H3 O3 G( w   閮: service httpd start  #        
' l5 ~5 O+ ^2 t4 N' J, y
        service httpd start  #甇) u  r9 @; c4 V& P
寞鈭5 t# z. l+ H, x2 c6 O; x6 P1 P
/etc/httpd/conf.d/匐撱箔函瑼(閮剖銝virtual host)
; s2 f1 @: N; a3 X靘憒: 8 T5 g# ?7 T. Q9 Q' F
virtual1.conf
. b( c& u  g% k. m: ~% @  i
  1. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫
    + b* k* [" T, h, I- d( Q
  2.     ServerAdmin [email protected]: R  B; I/ n! h5 i7 M
  3.     DocumentRoot /home/coav4u/public_html
    0 J/ u  s( }9 ^+ a
  4.     ServerName av4u.co
    6 k" c  _: t! ~7 n8 n$ y8 x2 S
  5.     ErrorLog logs/www.av4u.co-error_log6 X& K* L, d/ C& }$ ^7 b  {4 z
  6.     CustomLog logs/www.av4u.co-access_log common
    1 `8 U/ m3 b* O; [& t7 X$ a
  7. </VirtualHost>
銴鋆賭誨蝣
virtual2.conf

8 |2 q# Q' q& O/ e7 h! v8 }
  1. <VirtualHost 192.168.1.12:80>2 A( F+ t6 a& B
  2.     ServerAdmin [email protected]
    9 S# X& ^) Y4 \% k* B2 E
  3.     DocumentRoot /home/coav4u/public_html! e# z" P4 g4 R# _
  4.     ServerName www.av4u.co* J& k( O  q$ q1 h& x) h
  5.     ErrorLog logs/www.av4u.co-error_log, l2 I) v* c) v1 m8 w1 n6 G6 a
  6.     CustomLog logs/www.av4u.co-access_log common5 p5 i" e* k' }$ Z' z0 t
  7. </VirtualHost>
銴鋆賭誨蝣
摮瑼嗅 httpd

4 ?3 v: a7 [2 z  I+ p雿臬箇 error:9 P/ V) b) [0 h0 d; T% M9 T
[warn] _default_ VirtualHost overlap on port 80, the first has precedence" ]8 ~, l6 D, X) k2 Z) b
SOL:
2 o8 ]( V% ?" g" y4 u. A望 /etc/httpd/conf/httpd.conf NameVirtualHost *:80 virtual1.confvirtual2.conf 折質身摰 <VirtualHost 192.168.1.12:80> 銝寥,甇蝣箇閮剖:
, `# U+ Q2 d  B6 ihttpd.conf virtual1.confvirtual2.conf(砌蜓璈閮剖瑼)銝舫賜 *:80 撠望舫賜 192.168.1.12:80
+ n# J, M9 h1 u2 V8 `3 ohttpd.conf ===> NameVirtualHost *:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost *:80>  
- n! n8 D/ q" ^2 ?" {; rhttpd.conf ===> NameVirtualHost 192.168.1.12:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost 192.168.1.12:80>
, m$ K- ?$ k% H" C  E/ G

4 v; r9 o& @0 Y7 K4 q  A
( f2 E5 A7 S# l  y0 X# |

8 ^; R) U0 Y) v) w* l4 Z; h( |

雿輻券

祉蝛閬

BT蝳

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

QQ|撠暺撅||52AV璈A

GMT+8, 2024-11-22 07:23 , Processed in 0.058403 second(s), 16 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵