Results 1 to 2 of 2

Thread: การ config Apache2 เพื่อทำ reverse proxy ให้เข้าถึงเครื่องใน internal network

  1. #1
    Administrator asylu3's Avatar
    Join Date
    Jun 2000
    Location
    Thailand
    Posts
    3,557


    หากท่านมีเว็บหลักที่สามารถเปิดได้ที่ไหนในโลก เช่น 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 ดังนี้

    Code:
    <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>
    จากนั้นก็ให้โหลด module มาใช้งาน /etc/init.d/apache2 force-reload
    เท่านี้ก็สามารถเรียกใช้งาน content ที่อยู่ใน server ที่ไม่สามารถเข้าถึงจาก Public internet ตรงๆได้แล้ว

  2. #2
    Administrator asylu3's Avatar
    Join Date
    Jun 2000
    Location
    Thailand
    Posts
    3,557


    เสริมนิดนึงถ้า config แล้วไม่ระวังเรื่อง / จะทำให้ Access ไปเครื่องด้านหลังไม่ได้ต้องระวังให้ดี

Similar Threads

  1. Myspace Proxy, Facebook Proxy, Orkut Proxy, Bebo Proxy, WAYTHRU.NET
    By newsbot in forum World Hacking/Security News
    Replies: 0
    Last Post: 02-12-2007, 05:37 PM
  2. วิธีการ Config Network แบบไม่ต้อง Restart
    By asylu3 in forum Operating System, Server and Networking
    Replies: 0
    Last Post: 20-05-2007, 03:07 PM
  3. config linux redhat network
    By ar3s in forum Operating System, Server and Networking
    Replies: 0
    Last Post: 06-08-2003, 01:03 PM
  4. Replies: 0
    Last Post: 01-01-1970, 07:00 AM

Members who have read this thread : 0

Actions : (View-Readers)

There are no names to display.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •