99精品国产综合久久久久五月天,免费观看欧美大片毛片不用播放器 ,AV无码理论片在线观看免费网站,国产精品国产成人国产三级

Board logo

標(biāo)題: [分享] wdcp中利用apache作反向代理 [打印本頁(yè)]

作者: besthome    時(shí)間: 2019-4-28 23:04     標(biāo)題: wdcp中利用apache作反向代理

首先這個(gè)貼子就非常好:
http://fudaan.com/bbs/thread-58866-1-1.html但是很奇怪,反向代理baidu可以,其它網(wǎng)站或者ip,以及ip:端口的,總是不成功。
因此,找了這個(gè)方法:在apache的vhost文件中,找到相應(yīng)的網(wǎng)站.vhost文件

編輯下:

  1. <VirtualHost *:88>
  2. DocumentRoot /www/web/xxxx_com/public_html
  3. ServerName xxxx.com
  4. ServerAlias www.xxxx.com
  5. ErrorDocument 400 /errpage/400.html
  6. ErrorDocument 403 /errpage/403.html
  7. ErrorDocument 404 /errpage/404.html
  8. ErrorDocument 503 /errpage/503.html
  9. </VirtualHost>
  10. <Directory /www/web/xxxx_com>
  11.     Options +Indexes +Includes +FollowSymLinks +MultiViews
  12.     AllowOverride All
  13.     Require all granted
  14. </Directory>
  15.         # 開(kāi)始-apache反向代理
  16.         ProxyRequests Off
  17.         #apache的監(jiān)聽(tīng)其他端口
  18.         <proxy http://114.114.114.114:8080/>
  19.           AllowOverride None
  20.           Order Deny,Allow
  21.           Allow from all
  22.         </proxy>
  23.        
  24.         ProxyPass / http://114.114.114.114:8080/
  25.         ProxyPassReverse / http://114.114.114.114:8080/
  26.         # 結(jié)束-apache反向代理
復(fù)制代碼



發(fā)現(xiàn)新版本已經(jīng)有反向代理功能,需要專(zhuān)業(yè)版本啟用,這么倒騰管理員不要見(jiàn)怪。
作者: besthome    時(shí)間: 2019-4-29 22:38

上面的方法,有個(gè)問(wèn)題,如果多個(gè)反向代理時(shí),總是指向一個(gè)網(wǎng)站,也沒(méi)找到原因在哪,管理員或者其他兄弟有知道的,敬請(qǐng)指點(diǎn)。
后來(lái)試了試,直接利用nginx來(lái)作反向代理
在ngnix的vhost中,編輯對(duì)應(yīng)的配置文件
  1. location /{
  2.     proxy_set_header Host $host:$server_port;
  3.     proxy_pass http://ip:端口/;
  4. }
復(fù)制代碼





歡迎光臨 WDlinux官方論壇 (http://fudaan.com/bbs/) Powered by Discuz! 7.2