หากท่านมีเว็บหลักที่สามารถเปิดได้ที่ไหนในโลก เช่น citecclub.org
แต่มี server ในองค์กรที่ไม่ไดสามารถเข้าถึงได้โดยตรงอยู่ชื่อ mylocalhost.com (ชื่อปลอมๆตั้งขึ้นมาให้รู้จักภายในวง network) เชื่อมกับ citecclub.org อยู่ด้านหลัง
แล้วอยากให้ทุกครั้งที่ผู้ชมเรียก
้ http://citecclub.org/somewhere
ไปเรียก
http://mylocalhost.com/somewhere
มาแสดงผล
สามารถปรับแต่ง apache ได้ดังนี้[hide=1]
ปล. อ้างอิง Ubuntu
พิมพ์คำสั่งนี้
#a2emod
แล้วเลือก enable: proxy และ proxy_http
edit /etc/apache2/mod-enabled/proxy.conf ดังนี้
จากนั้นก็ให้โหลด module มาใช้งาน /etc/init.d/apache2 force-reloadCode:<IfModule mod_proxy.c> #turning ProxyRequests on and allowing proxying from all may allow #spammers to use your proxy to send email. ProxyRequests Off <Proxy *> AddDefaultCharset off Order deny,allow Allow from all </Proxy> # Enable/disable the handling of HTTP/1.1 "Via:" headers. # ("Full" adds the server version; "Block" removes all outgoing Via: headers) # Set to one of: Off | On | Full | Block ProxyVia On ProxyPass /somewhere http://mylocalhost.com/somewhere ProxyPassReverse /somewhere http://mylocalhost.com/somewhere </IfModule>
เท่านี้ก็สามารถเรียกใช้งาน content ที่อยู่ใน server ที่ไม่สามารถเข้าถึงจาก Public internet ตรงๆได้แล้ว


Reply With Quote
