52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-10-3 10:29:29 | 芰閰脖 撣 |摨閬 |梯璅∪
啣  <Linux CENTOS 6 + Apache + mysql>
寞銝
1. vi /etc/httpd/httpd.conf
6 J# H. |% t2 |3 u) G' _+ G2. 曉 # VirtualHost example:7 G: l6 [$ f9 Q! D! V0 B" Z
  1. 嗡乩virtual server 閮剖,靘憒:
    8 _+ \9 B# M. n; ~$ B
  2. #2014/10/02 add. g$ S( y3 A5 o
  3. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫! R+ t" M7 U* P  x/ S' X& g# C  G
  4.     ServerAdmin [email protected]* Y! b" o. S% X, k" a0 J9 A
  5.     DocumentRoot /home/coav4u/public_html- e& x- `# L+ S% L, e, d% b
  6.     ServerName av4u.co# {' ~/ Y% U" s7 V- Y; |4 Z  X
  7.     ErrorLog logs/www.av4u.co-error_log
    * k! s* `% Y, h( D' e
  8.     CustomLog logs/www.av4u.co-access_log common/ X! ^' m/ S$ F
  9. </VirtualHost>3 v! j7 u8 I- P3 }0 C& ^1 L
  10. <VirtualHost 192.168.1.12:80>0 I, L; |  o1 `6 [
  11.     ServerAdmin [email protected]0 ?8 p3 n$ m- g. B% a
  12.     DocumentRoot /home/coav4u/public_html/ T7 F8 V/ c' S+ x1 F3 O" K6 O3 `
  13.     ServerName www.av4u.co4 c; I3 x+ y, @8 n) Z3 ^7 a6 }
  14.     ErrorLog logs/www.av4u.co-error_log
    ( G8 {$ {0 d4 t0 e& g
  15.     CustomLog logs/www.av4u.co-access_log common
    " T' E/ M- u* p# X
  16. </VirtualHost>
銴鋆賭誨蝣
    臬摰2 Domain
name (av4u.comwww.av4u.com)啣銝祉征,典隡潔瘥 nginx 閮剖蝔敺桅獄拐暺
6 v; E1 v+ ?9 b9 ~3. Apache : \0 D& l& j0 b2 ?
    service httpd restart #隞叵oot頨怠   --->摰
7 k% \- e3 r  e. u   閮: service httpd start  #        
3 k5 q0 w* Q! g$ ?# |" J
        service httpd start  #甇2 f% u% ], {- p1 v2 X+ z
寞鈭
& U; j# ?9 F5 Q, N/etc/httpd/conf.d/匐撱箔函瑼(閮剖銝virtual host)
+ ^$ X% H1 K# X0 K" V% K" F靘憒:   o  p  @  H& N; z2 V
virtual1.conf
+ C7 u* \7 p: ]
  1. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫
    : e6 c; G! P0 i3 G' b
  2.     ServerAdmin [email protected]
    * H$ h; @9 ]- T! h7 b
  3.     DocumentRoot /home/coav4u/public_html' d) S3 `% D. k0 y
  4.     ServerName av4u.co
    / [4 P* Y2 N7 Q$ _* Z
  5.     ErrorLog logs/www.av4u.co-error_log; [6 ~0 Q; c" d& s( n% ?
  6.     CustomLog logs/www.av4u.co-access_log common7 x2 G: A( i# y& W% i# k3 L
  7. </VirtualHost>
銴鋆賭誨蝣
virtual2.conf

  H% W) Y3 q) G
  1. <VirtualHost 192.168.1.12:80>$ Q( P: z* v6 ?1 i8 k& g
  2.     ServerAdmin [email protected]+ Y) U7 T7 \3 i0 f
  3.     DocumentRoot /home/coav4u/public_html
    ) O: Y1 L+ [/ R$ p
  4.     ServerName www.av4u.co- n) R* C9 l: D
  5.     ErrorLog logs/www.av4u.co-error_log
    0 y' b$ E3 o; V3 K! z
  6.     CustomLog logs/www.av4u.co-access_log common  j5 m- W) e' i" c, ^* n
  7. </VirtualHost>
銴鋆賭誨蝣
摮瑼嗅 httpd
) P' _4 F+ Z6 s
雿臬箇 error:
1 U, h! q, `' K  N9 b2 q0 j3 C! _ [warn] _default_ VirtualHost overlap on port 80, the first has precedence
$ V  {. ?$ O7 vSOL:
5 o; s' Q/ @. b$ O% r9 w% @望 /etc/httpd/conf/httpd.conf NameVirtualHost *:80 virtual1.confvirtual2.conf 折質身摰 <VirtualHost 192.168.1.12:80> 銝寥,甇蝣箇閮剖:
- o* t/ P2 z6 Q# L. Fhttpd.conf virtual1.confvirtual2.conf(砌蜓璈閮剖瑼)銝舫賜 *:80 撠望舫賜 192.168.1.12:80 : p+ v+ _/ r) E6 ^. h5 k4 M
httpd.conf ===> NameVirtualHost *:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost *:80>   . a& ~/ Y& r9 h. K
httpd.conf ===> NameVirtualHost 192.168.1.12:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost 192.168.1.12:80>4 j4 B! Z3 Y* k, z

# E3 H& i2 g; Z/ I2 D
& v# O+ n4 m+ b8 r5 N

: w, M' {' z0 Y0 ?& F

雿輻券

祉蝛閬

BT蝳

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

QQ|撠暺撅||52AV璈A

GMT+8, 2024-12-26 04:40 , Processed in 0.066965 second(s), 16 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵