List Info

Thread: cp behind apache - mod_rewrite blues




cp behind apache - mod_rewrite blues
user name
2006-02-27 00:21:06
Hi - I hope someone can just check something about my
understanding
about using Apache 2 as a frontend to CP 2.

First the problem. When I try to access:

http://dev8.foo.com/

... I get nothing in the rewrite_log (with rewriteloglevel
set to 9)
and in the error_log I get ...

Attempt to serve directory: proxy:http://localhost:8080/

... if I am on the server itself and I attempt to access
http://localhost:8080/
I get what I expect (the output from
tut01_helloworld.py).

My primary question is : do I need to use baseURLFilter - I
wasn't at
first but I have now set it up as ...

baseUrlFilter.on = True
baseUrlFilter.baseUrl='http://dev8.foo.com'
baseUrlFilter.useXForwardedHost = True

... I'm not sure I understand what baseURLFilter does.

My secondary question is has anyone seen that apache error
before and
can give me a steer on what it might mean.

My rewrite rules look this :

RewriteEngine on
RewriteRule ^(.*) http://localhost:8080/$1
[P]

Any thoughts would be welcome.

regards

Richard.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---

cp behind apache - mod_rewrite blues
user name
2006-02-27 00:56:51
"northof40" <shearichardgmail.com> writes:

> Hi - I hope someone can just check something about my
understanding
> about using Apache 2 as a frontend to CP 2.
>
> First the problem. When I try to access:
>
> http://dev8.foo.com/
>
> ... I get nothing in the rewrite_log (with
rewriteloglevel set to 9)
> and in the error_log I get ...
>
> Attempt to serve directory: proxy:http://localhost:8080/
> 
> ... if I am on the server itself and I attempt to
access
> http://localhost:8080/ I
get what I expect (the output from
> tut01_helloworld.py).
>
> My primary question is : do I need to use baseURLFilter
- I wasn't
> at first but I have now set it up as ...
>
> baseUrlFilter.on = True
> baseUrlFilter.baseUrl='http://dev8.foo.com'
> baseUrlFilter.useXForwardedHost = True

Word of warning: I am only familiar with the new 2.2 version
of
CherryPy so take anything I say with an appropriately sized
grain of
salt.

The baseUrlFilter stuff (or with the new API
base_url_filter) is
mostly helpful for making sure that redirects go to the
right place.
For example, if cherrypy is serving up an object at
http://dev8.foo.com/so
mething/ and the user types in
http://dev8.foo.com/som
ething (without the trailing slash) cherrypy
will redirect to 'something/'.  If the base url isn't set
correctly
then you will get redirected to http://localhost:808
0/something/ which
is only likely to make you happy if you happen to be surfing
from the
server.  The base_url_filter stuff makes sure that cherrypy
sets the
base url correctly before redirecting.

In your case, however, that's not the problem.  The problem
is that
you are having an issue with Apache 2.

> ... I'm not sure I understand what baseURLFilter does.
>
> My secondary question is has anyone seen that apache
error before and
> can give me a steer on what it might mean.
>
> My rewrite rules look this :
>
> RewriteEngine on
> RewriteRule ^(.*) http://localhost:8080/$1
[P]

That looks good.  Are you sure that both mod_rewrite and
mod_proxy are
enabled on your server.  RewriteRules that end in [P]
require
mod_proxy (I believe).

> Any thoughts would be welcome.

Good luck 

Jason

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )