52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-10-3 10:29:29 | 芰閰脖 撣 |摨閬 |梯璅∪
啣  <Linux CENTOS 6 + Apache + mysql>
寞銝
1. vi /etc/httpd/httpd.conf. r" P  n- z5 z4 Z1 {, S) o* `
2. 曉 # VirtualHost example:
- X" T" r$ I2 n- _8 N
  1. 嗡乩virtual server 閮剖,靘憒:
    2 t. j% f# Q1 t+ f5 j6 ^5 n9 X! d# x
  2. #2014/10/02 add
    ) L) g$ G/ R, J
  3. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫
    2 R+ u. |# X! h6 P
  4.     ServerAdmin [email protected]
    " P( K1 O" d0 i3 a
  5.     DocumentRoot /home/coav4u/public_html; A5 N$ [$ o- P( d' K2 \
  6.     ServerName av4u.co
    $ r1 z+ J2 D: |2 n2 H$ {8 b
  7.     ErrorLog logs/www.av4u.co-error_log3 f8 s; @+ T: }1 g" f" m/ D7 n* F
  8.     CustomLog logs/www.av4u.co-access_log common: v2 o% N$ u: v: M
  9. </VirtualHost>
    7 U9 a4 K% {  h% X0 I1 _! \( g
  10. <VirtualHost 192.168.1.12:80>
    * k# [& x; S; L$ i7 z( n/ h2 U
  11.     ServerAdmin [email protected]" s" C: G# Z+ Q
  12.     DocumentRoot /home/coav4u/public_html
    $ {8 u* |; A1 S3 Y
  13.     ServerName www.av4u.co
    1 m5 e5 U! G8 g
  14.     ErrorLog logs/www.av4u.co-error_log
    2 k. f+ B  I0 H$ W
  15.     CustomLog logs/www.av4u.co-access_log common
    * T& R! P1 n  Y2 t5 k( h2 b0 `$ }
  16. </VirtualHost>
銴鋆賭誨蝣
    臬摰2 Domain
name (av4u.comwww.av4u.com)啣銝祉征,典隡潔瘥 nginx 閮剖蝔敺桅獄拐暺
8 A0 h! [- e$ l' T; a9 [( E  v3. Apache
; X# p# a; M& K; B    service httpd restart #隞叵oot頨怠   --->摰
; r8 N0 G; E8 m3 q1 v1 d   閮: service httpd start  #        

! v+ g6 r$ R; I' J' {6 {* V        service httpd start  #甇9 D% T( B" Y+ I1 T6 m4 T7 q
寞鈭$ Q* z7 {" w& u+ R
/etc/httpd/conf.d/匐撱箔函瑼(閮剖銝virtual host)
( t8 \/ n2 Z% m3 h靘憒: & V+ C+ c& n1 @& p" E
virtual1.conf
$ g' j, \) J0 R" ?% Z8 x; d
  1. <VirtualHost 192.168.1.12:80>  # <VirtualHost 127.0.0.1:80>  #蝚西箄酉閫
    5 B0 |7 t4 }" L, H; _8 U8 `
  2.     ServerAdmin [email protected]
    * T3 u0 q. r* G0 Q/ n
  3.     DocumentRoot /home/coav4u/public_html
    % E$ n8 T- Q( U. e$ E) [5 S- a
  4.     ServerName av4u.co. u& P; e, {  t( ~5 c4 m  A
  5.     ErrorLog logs/www.av4u.co-error_log
    5 ]" S! S& T: w* v( k6 R/ Z
  6.     CustomLog logs/www.av4u.co-access_log common! J3 Z, [5 \. p$ r/ N4 S- @
  7. </VirtualHost>
銴鋆賭誨蝣
virtual2.conf
" t# k' X6 C3 d9 [
  1. <VirtualHost 192.168.1.12:80>
    0 q; C  w- w( |; Q3 h
  2.     ServerAdmin [email protected]$ a. W6 t1 E9 j6 p: }
  3.     DocumentRoot /home/coav4u/public_html
    % O. U: J0 v3 @& `6 [
  4.     ServerName www.av4u.co/ H9 N/ e- m8 s$ s6 J- I
  5.     ErrorLog logs/www.av4u.co-error_log( `2 U1 w$ @# t3 W4 S
  6.     CustomLog logs/www.av4u.co-access_log common8 Y' O; z- s% W+ K+ F7 w! j
  7. </VirtualHost>
銴鋆賭誨蝣
摮瑼嗅 httpd
& [5 j) ~3 q& e: v- ^
雿臬箇 error:
* R7 }1 H& ^" A( S [warn] _default_ VirtualHost overlap on port 80, the first has precedence: V% E2 C" ]1 X
SOL:
5 s4 Z2 t* ]7 i5 @$ T望 /etc/httpd/conf/httpd.conf NameVirtualHost *:80 virtual1.confvirtual2.conf 折質身摰 <VirtualHost 192.168.1.12:80> 銝寥,甇蝣箇閮剖:
5 v/ o2 h- \( O: jhttpd.conf virtual1.confvirtual2.conf(砌蜓璈閮剖瑼)銝舫賜 *:80 撠望舫賜 192.168.1.12:80
. \# i. W% |/ X- N9 Xhttpd.conf ===> NameVirtualHost *:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost *:80>   6 k7 ^3 M) e' J
httpd.conf ===> NameVirtualHost 192.168.1.12:80  ,  virtual1.confvirtual2.conf ===> <VirtualHost 192.168.1.12:80>
. G& t) p' D8 p  G0 b( Y: z# c
/ C! q! _$ e- ~* J3 L2 U

1 p1 V& j: B% ~9 ]' p4 p" f7 h
$ }, q# ]! E0 H5 b( t' y6 O

雿輻券

祉蝛閬

BT蝳

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

QQ|撠暺撅||52AV璈A

GMT+8, 2024-11-25 03:16 , Processed in 0.068114 second(s), 16 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵