httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Richardson" <btri...@gmail.com>
Subject Re: [users@httpd] Needing help with mod_proxy
Date Wed, 02 Jan 2008 17:38:47 GMT
Axel,

Again, thanks for your help.  However, I made the changes you suggested but
I'm still getting the same result.  Below is what I have.  Also, nothing is
showing up in my logs about rewrites... and I made sure I have ErrorLog
specified.  I hate to keep bugging you so don't worry about it if you don't
have time.

  RewriteEngine On
  RewriteLogLevel 9

  RewriteRule ^/$ /index.html [R]
  RewriteCond %{REQUEST_URI} ^/otherapp(.*)
  RewriteRule . http://127.0.0.1:3001%1 [L,P]
  RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
  RewriteRule . http://127.0.0.1:3000%{REQUEST_URI} [L,P]

  ProxyPassReverse /otherapp/ http://127.0.0.1:3001/
  ProxyPassReverse / http://127.0.0.1:3000/

Thanks again! -- BTR

On Jan 2, 2008 9:36 AM, Axel-Stephane SMORGRAV <
Axel-Stephane.SMORGRAV@europe.adp.com> wrote:

> My fault. I guess that what is happening is that the browser is being
> redirected and the Location header is not rewritten because I omitted the
> ProxyPassReverse directives.
>
> Try adding:
>
> ProxyPassReverse /otherapp/ http://127.0.0.1:3001/
> ProxyPassReverse / http://127.0.0.1:3000/
>
> There is another problem due to you removal of the %{REQUEST_URI} for
> /otherapp. You do not want to strip off the whole URI while proxying. You
> probably only want to strip off /otherapp. So now try this configuration:
>
>  RewriteEngine On
>  RewriteLogLevel 9
>
>  # You should not need this if you use mod_dir
>  RewriteRule ^/$ /index.html [R]
>
>  RewriteCond %{REQUEST_URI} ^/otherapp(.*)
>  RewriteRule . http://127.0.0.1:3001%1 [L,P]
>
>  RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
>  RewriteRule . http://127.0.0.1:3000%{REQUEST_URI}<http://127.0.0.1:3000%%7BREQUEST_URI%7D>[L,P]
>
>  # I here assume that ProxyPreserveHost is Off
>  ProxyPassReverse /otherapp/ http://127.0.0.1:3001/
>  ProxyPassReverse / http://127.0.0.1:3000/
>
>
> -ascs
>
> ________________________________
>
> De : Bryan Richardson [mailto:btricha@gmail.com]
> Envoyé : mercredi 2 janvier 2008 17:13
> À : users@httpd.apache.org
> Objet : Re: [users@httpd] Needing help with mod_proxy
>
>
> Hi again Axel.  I tried out what you said and I'm still having some
> problems.  Below is what I have in my site's config file.  This makes it
> possible for me to go to www.mysite.com/otherapp and I will get forwarded
> to my Rails app server at port 3001.  Notice I had to leave %{REQUEST_URI}
> off the end of the RewriteRule for my otherapp rule.  However, if I then
> click on a link within my Rails app, it tries to go to
> www.mysite.com/controller rather than www.mysite.com/otherapp/controller.
>  How can I make it such that my Rails app thinks that
> www.mysite.com/otherapp is its root rather than www.mysite.com?  Thanks
> again for your help! -- BTR
>
>  <Proxy *>
>    Order deny,allow
>    Allow from All
>  </Proxy>
>
>  RewriteEngine On
>  RewriteRule ^/$ /index.html [QSA]
>  RewriteCond %{REQUEST_URI} ^/otherapp
>  RewriteRule . http://127.0.0.1:3001 <http://127.0.0.1:3001> [L,P]
>  RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
>  RewriteRule . http://127.0.0.1:3000%{REQUEST_URI}<http://127.0.0.1:3000%%7BREQUEST_URI%7D>[L,P]
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Mime
View raw message