Hello!
I am having a problem with running TurboGears 0.9a6 behind Apache 2.0
and mod_proxy.
The following code:
@expose()
def addFileToModel(self, fileDescExt, file, modelId):
...
redirect("/wasim/showModel", modelId=model.id)
@expose(template="hydrodb.templates.wasim.model")
def showModel(self, modelId):
...
Creates the following HTTP session:
------------------------------------------------
POST /hydrodb/wasim/addFileToModel HTTP/1.1
Host: localhost
.....
------------------------------------------------
HTTP/1.x 302 Found
Date: Mon, 26 Jun 2006 07:41:04 GMT
Server: CherryPy/2.2.1
Location:
http://localhost:8080/hydrodb/hydrodb/wasim/showModel?modelId=1
Content-Length: 163
Content-Type: text/html; charset=utf-8
------------------------------------------------
GET /hydrodb/hydrodb/wasim/showModel?modelId=1 HTTP/1.1
Host: localhost:8080
...
------------------------------------------------
HTTP/1.x 404 Not Found
Which is obviously not what i want.
This seemed to work ok with Apache 2.2 but I had to downgrade to 2.0.58
for deployment reasons.
my httpd.conf has:
<Location /hydrodb>
# Make Apache serve UTF-8
AddDefaultCharset utf-8
ProxyPass http://localhost:8080
ProxyPassReverse http://localhost:8080
# Start server if it isn't running
ErrorDocument 503 /cgi-bin/autostart.py
ErrorDocument 502 /cgi-bin/autostart.py # added for apache 2.0
</Location>
My app.cfg has server.webpath = "/hydrodb"
The strange thing is that redirects sometimes work, but today the error
resurfaced and would not go away. Last time reloading the server made
the problem go away, but this didn't work today (I'm pretty sure it
worked on Friday with Apache 2.0).
I checked, and redirect is raising cherrypy.HTTPRedirect with the
correct path (/hydrodb/wasim/showModel?modelId=1), so this is probably
more of a deployment/cherrypy question than a bug report. What are the
differences between Apache 2.0 and 2.2 that causes cherrypy to generate
the wrong urls for redirect? I'm guessing the problem only shows up in
redirect because urls only specify the bit after the domain, but the
full http://domain/path is required for redirect.
Tormod
**************************************************************
Neither the confidentiality nor the integrity of this message can be vouched
for following transmission on the Internet. All messages sent to a DNV email
addressee are swept by Sybari Antigen for the presence of malicious code. DNV
acknowledges that unsolicited email represents a potential security risk, and
DNVs filters to block unwanted emails are therefore continuously adjusted.
**************************************************************
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---