Results 1 to 3 of 3

Thread: Apache proxy to another apache

  1. #1
    Join Date
    Jun 2007
    Beans
    95
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Apache proxy to another apache

    Hi,

    I've got a bit of a problem that I can't seem to figure out and as much as I search around I can't find what I'm trying to do.
    Anyway I've got an Apache server running on a network and this server is visible to the internet. On the same network I've got another web server.
    On the main one I've already setup a sub domain (example:http://sub.domain.com/) but now I'd like to set up apache forward everything on this sub domain to the second server.
    I've tried adding something like this to the httpd.conf but I think I'm barking up the wrong tree.
    Code:
    ProxyPass / http://lan_ip_second_server
    ProxyPassReverse / http://lan_ip_second_server7
    <Proxy http://lan_ip_second_server/>
    Order Allow,Deny
    Allow from all
    </Proxy>
    Can this even be done?

    Thanks for the help and bye

  2. #2
    Join Date
    Jan 2008
    Location
    Sittingbourne, UK
    Beans
    196
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Apache proxy to another apache

    Try it as a virtual host as follows:

    <VirtualHost 1.2.3.4:80>
    ServerName sub.domain.com
    ProxyPass / http://1.2.3.5/
    ProxyPassReverse / http://1.2.3.5/
    </VirtualHost>

  3. #3
    Join Date
    Jun 2007
    Beans
    95
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Apache proxy to another apache

    Philio -> Thanks.... I didn't even think that it was that easy.
    I just had add this:
    Code:
    ServerName sub.domain.com
    ProxyPass / http://1.2.3.4/
    ProxyPassReverse / http://1.2.3.4.5/
    <Proxy http://1.2.3.4/>
    Order Allow,Deny
    Allow from all
    </Proxy>
    So thanks again.

Bookmarks

Posting Permissions

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