Find the answer to your Linux question:
Results 1 to 2 of 2
So after 48 hours of tinkering and looking at multiple sets of documentation across the internet I have set up apache2 with mod_proxy and its very much working. I feel ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2005
    Posts
    2

    Apache reverse proxy config


    So after 48 hours of tinkering and looking at multiple sets of documentation across the internet I have set up apache2 with mod_proxy and its very much working. I feel as thought I have learned more than I expected to about apache.

    I have one lingering issue that I am hoping to get some apache guru advise on. My apache vhost is reaching out to multiple internal sites in my network and reverse proxying them. One site in particular is still giving me trouble.

    here is my vhost config data that works with this pesky site:

    *if you are wondering what this /webui folder is the ajax application needs this folder mounted as a subdirectory. I mostly got the config from looking at how to reverse proxy zimbra.

    Code:
    <Location "/webUI">
      ProxyPass hxxp://192.168.1.XXX:7000/webUI
      ProxyPassReverse hxxp://192.168.1.XXX:7000/webUI
      ProxyPassReverse /
      SetOutputFilter        proxy-html
      ProxyHTMLExtended      On
      ProxyHTMLURLMap /webUI /webUI
    </Location>
    
    <Location "/">
      ProxyPass hxxp://192.168.1.XXX:7000/
      ProxyPassReverse hxxp://192.168.1.XXX:7000/
      ProxyPassReverse /
      ProxyHTMLExtended      On
      SetOutputFilter        proxy-html
      ProxyHTMLURLMap / /
    </Location>
    Now again the above config works but it places it in the root of the apache server. I would instead like it to be in a folder like I did for my other sites when I reverse proxied them. So I changed my config to this below and it fails. I dont know why or what I am doing wrong.

    Code:
    <Location "/app/webUI">
      ProxyPass hxxp://192.168.1.XXX:7000/webUI
      ProxyPassReverse hxxp://192.168.1.XXX:7000/webUI
      ProxyPassReverse /
      SetOutputFilter        proxy-html
      ProxyHTMLExtended      On
      ProxyHTMLURLMap /app/webUI /webUI
    </Location>
    
    <Location "/app">
      ProxyPass hxxp://192.168.1.XXX:7000/
      ProxyPassReverse hxxp://192.168.1.XXX:7000/
      ProxyPassReverse /
      ProxyHTMLExtended      On
      SetOutputFilter        proxy-html
      ProxyHTMLURLMap /app /
    </Location>
    I am starting to think I need something with rewrite to ensure that apache appends /app1/ to the beginning of every url and graphic..

    Any help or advise is appreciated

  2. #2
    Just Joined! bisti's Avatar
    Join Date
    Jan 2011
    Posts
    7
    Try to add this rewrite rule:

    PHP Code:
    RewriteCond %{REMOTE_HOST} =192.168.1.XXX
    RewriteRule 
    ^/$ /app

Posting Permissions

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