+ Post New Thread
Results 1 to 9 of 9
Virtual Learning Platforms Thread, Reverse proxy Frog to a subdirectory with Apache? in Technical; We have Frog here, and we also have a domain which we want to run the site on. However, we ...
  1. #1

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,807
    Thank Post
    517
    Thanked 2,469 Times in 1,913 Posts
    Blog Entries
    24
    Rep Power
    835

    Reverse proxy Frog to a subdirectory with Apache?

    We have Frog here, and we also have a domain which we want to run the site on. However, we don't want to dedicate the domain purely to it - we already do various reverse proxying things with it, pointing to various services in school (housepoints system, oliver library etc...). So what I want to do is reverse proxy http://domain/site to be the frog server, and then put a html redirect at the root of the site, leaving everything else intact.

    However, Frog does various things by absolute paths - images stored in a user's area are under /user/blah, some system icons are in /sysicons and /sysimages etc... Meaning they are trying to access http://domain/user rather than http://domain/site/user.

    Anyone got any ideas how I can overcome this? I've only ever done simple reverse proxying using 'ProxyPass /blah http://10.5.4.1/blah' and 'ProxyPassReverse /blah http://10.5.4.1/blah'.

  2. #2

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,807
    Thank Post
    517
    Thanked 2,469 Times in 1,913 Posts
    Blog Entries
    24
    Rep Power
    835
    No-one reverse proxied Frog?

  3. #3

    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Knightsbridge
    Posts
    5,647
    Thank Post
    1,256
    Thanked 781 Times in 678 Posts
    Rep Power
    236
    Quote Originally Posted by localzuk View Post
    we don't want to dedicate the domain purely to it
    Could you give it a dedicated server - frog.yourdomain.com? That should be nice and simple to do, just an entry in your internal DNS to the local IP address and one in external DNS for your external IP address.

  4. #4

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,807
    Thank Post
    517
    Thanked 2,469 Times in 1,913 Posts
    Blog Entries
    24
    Rep Power
    835
    No, it has to go on our main domain, as it is becoming our main website. So, www.school.county.sch.uk will point to the homepage, via a redirect to /site which reverse proxies to the frog box.

    It is already accessible via a sub-domain for frog use, but its the part where we're making it our main website too we're trying to do without having to reconfigure every other publicly visible site we have reverse proxied.

  5. #5

    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Knightsbridge
    Posts
    5,647
    Thank Post
    1,256
    Thanked 781 Times in 678 Posts
    Rep Power
    236
    Quote Originally Posted by localzuk View Post
    No, it has to go on our main domain, as it is becoming our main website.
    Ah, I see. Don't you need Apache to do URL rewriting (mod_rewrite) rather than just plain reverse proxying?

  6. #6

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,807
    Thank Post
    517
    Thanked 2,469 Times in 1,913 Posts
    Blog Entries
    24
    Rep Power
    835
    Quote Originally Posted by dhicks View Post
    Ah, I see. Don't you need Apache to do URL rewriting (mod_rewrite) rather than just plain reverse proxying?
    I shouldn't really, no. But it looks like I will need to, yes, but then I'll also need a list of all the subdirectories too, to create all the different rules. It should simply be doing the whole kit and kaboodle with reverse proxying - like it does on all our other services.

    Its all down to them using absolute paths for things that should be relative.

  7. #7

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,804
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    Be aware that this will break SSL.

  8. #8

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,807
    Thank Post
    517
    Thanked 2,469 Times in 1,913 Posts
    Blog Entries
    24
    Rep Power
    835
    Quote Originally Posted by Geoff View Post
    Be aware that this will break SSL.
    Only if the SSL is being used on the Frog server... If it were being done on the Apache server instead, it'd be fine - we've encrypted services this way before.

    The other way would be for the site not to use SSL at all, and the login to VLE be directed to the frog subdomain we have which has its own SSL set up.

  9. #9

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,804
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    Ok then, my back of a napkin apache config looks like this?

    Code:
    LoadModule proxy_module      modules/mod_proxy.so
    LoadModule proxy_http_module modules/mod_proxy_http.so
    LoadModule headers_module    modules/mod_headers.so
    LoadFile   /usr/lib/libxml2.so
    LoadModule proxy_html_module modules/mod_proxy_html.so
    LoadModule xml2enc_module modules/mod_xml2enc.so
    
    ProxyRequests off
    ProxyPass /frog/ http://frog.internal.example.com/
    ProxyHTMLURLMap http://frog.internal.example.com /frog
    
    <Location /frog/>
            ProxyPassReverse /
            ProxyHTMLEnable On
            ProxyHTMLURLMap  /      /frog/
            RequestHeader    unset  Accept-Encoding
    </Location>
    For the purposes of the above configuration I've ignored the possibility of any caching/load balancing/etc.
    Last edited by Geoff; 20th December 2012 at 04:27 PM.

SHARE:
+ Post New Thread

Similar Threads

  1. apache reverse proxy authentication
    By CyberNerd in forum Internet Related/Filtering/Firewall
    Replies: 1
    Last Post: 6th August 2012, 11:11 PM
  2. [Ubuntu] Reverse Proxy with squid
    By Arcath in forum *nix
    Replies: 1
    Last Post: 24th February 2010, 02:06 PM
  3. Replies: 0
    Last Post: 2nd November 2007, 09:58 AM
  4. Reverse Proxying with Apache.
    By maniac in forum Web Development
    Replies: 7
    Last Post: 5th April 2007, 11:04 AM
  5. Replies: 1
    Last Post: 14th February 2006, 12:31 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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