Compdigitec Labs

« | Home | »

Setting up a HTTP Gateway on Ubuntu 10.04

By admin | August 11, 2010

An HTTP gateway is one of the ways that one can host multiple sites using only one external IP. The way that it works is that the user requests the page from the gateway and specifies which host was requested. The gateway server then forwards the request to the appropriate web server, which then returns the result to the gateway server, and the gateway server returns the result transparently to the user. This is a much better way to do multiple domains without having to purchase additional static IP address for the purpose of hosting websites.

Prerequisites

Install packages apache2, libapache2-mod-proxy-html:

sudo apt-get install apache2 libapache2-mod-proxy-html

Process

  1. Enable the the Apache mod_proxy as it is not enabled by default:
    sudo a2enmod proxy_http
  2. Add a reverse proxy pass to the configuration. Open /etc/apache2/sites-available/default with your favourite text editor and add the following text:
    <VirtualHost *:80>
        <Proxy *>
         Order Deny,Allow
         Allow from all
        </Proxy>
    
     ServerName fooserver.example.com
    
     ProxyRequests Off
     ProxyPass / http://192.168.42.3/
     ProxyPassReverse / http://192.168.42.3/
    </VirtualHost>
    

    Replace fooserver.example.com with your own domain name, and replace 192.168.42.3 with the internal IP address of your server (keep the http:// portion).

  3. Restart Apache 2:
    sudo /etc/init.d/apache2 restart
  4. Using your hosting provider’s DNS tool, point your domain name (fooserver.example.com) to your public IP.
  5. You’re done! To test, visit your domain name and it should bring you the website on your internal server.

If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!

Topics: HTTP (Internet), Linux | 12 Comments »

12 Responses to “Setting up a HTTP Gateway on Ubuntu 10.04”

  1. Reverse proxy HTTPS with Apache at Compdigitec Labs Says:
    August 23rd, 2013 at 16:34

    […] procedure is mostly similar to the procedure with regular HTTP, but there are a few gimmicks involved […]

  2. Popular Ts Models On Chaturbate Says:
    April 11th, 2022 at 23:33

    … [Trackback]

    […] Read More on that Topic: compdigitec.com/labs/2010/08/11/setting-up-a-http-gateway-on-ubuntu-10-04/ […]

  3. สล็อตวอเลท Says:
    June 8th, 2022 at 13:21

    … [Trackback]

    […] Here you can find 48531 additional Information to that Topic: compdigitec.com/labs/2010/08/11/setting-up-a-http-gateway-on-ubuntu-10-04/ […]

  4. ขายเฟสบุ๊คยิงแอด Says:
    July 2nd, 2022 at 19:33

    … [Trackback]

    […] Read More to that Topic: compdigitec.com/labs/2010/08/11/setting-up-a-http-gateway-on-ubuntu-10-04/ […]

  5. check my reference Says:
    August 28th, 2022 at 19:14

    … [Trackback]

    […] Read More here to that Topic: compdigitec.com/labs/2010/08/11/setting-up-a-http-gateway-on-ubuntu-10-04/ […]

  6. ytconvert Says:
    August 29th, 2022 at 08:11

    … [Trackback]

    […] Info to that Topic: compdigitec.com/labs/2010/08/11/setting-up-a-http-gateway-on-ubuntu-10-04/ […]

  7. sbo Says:
    September 1st, 2022 at 18:25

    … [Trackback]

    […] Read More to that Topic: compdigitec.com/labs/2010/08/11/setting-up-a-http-gateway-on-ubuntu-10-04/ […]

  8. general labor Says:
    September 13th, 2022 at 19:53

    … [Trackback]

    […] Read More here on that Topic: compdigitec.com/labs/2010/08/11/setting-up-a-http-gateway-on-ubuntu-10-04/ […]

  9. 이천눈썹문신 Says:
    September 19th, 2022 at 04:22

    … [Trackback]

    […] Here you can find 10441 more Info on that Topic: compdigitec.com/labs/2010/08/11/setting-up-a-http-gateway-on-ubuntu-10-04/ […]

  10. Buy Kimber Pistols Near Me Says:
    October 3rd, 2022 at 21:34

    … [Trackback]

    […] Info on that Topic: compdigitec.com/labs/2010/08/11/setting-up-a-http-gateway-on-ubuntu-10-04/ […]

  11. Henry Lever-Action X Model .45-70 Government Rifle Says:
    October 4th, 2022 at 20:01

    … [Trackback]

    […] Read More to that Topic: compdigitec.com/labs/2010/08/11/setting-up-a-http-gateway-on-ubuntu-10-04/ […]

  12. สินเชื่อส่วนบุคคลอนุมัติง่ายที่สุด Says:
    October 9th, 2022 at 18:58

    … [Trackback]

    […] Find More here to that Topic: compdigitec.com/labs/2010/08/11/setting-up-a-http-gateway-on-ubuntu-10-04/ […]

Comments