Hi,
I'm experiencing some problems with sessions and .psp pages.
I'm running apache+mod_webkit+webware 0.6.1b1 on freeBSD.
My server is running on an internal subnet, using IP based virtual hosting.
The useful bits of my httpd.conf are here:
<Location /WK>
WKServer localhost 8086
SetHandler webkit-handler
</Location>
<VirtualHost 192.168.0.112>
ServerName admin.mysite.com
RewriteEngine On
RewriteRule (.*) /WK/AdminSite$1 [L,PT]
</VirtualHost>
<VirtualHost 192.168.0.113>
ServerName cp.mysite.com
RewriteEngine On
RewriteRule (.*) /WK/ControlPanel$1 [L,PT]
</VirtualHost>
In my AdminSite and ControlPanel directories, I've got an index.psp page
that does this:
<%@ page imports="GlobalFunctions,DBMagic" %>
<% session = trans.session()
if not session.value('authenticated_user', None):
session.values().clear()
res.sendRedirect('/Auth/login.psp')
%>
<head>
<link rel="stylesheet" href="/styles/wolfstyle.css" type="text/css">
</head>
<h1>control panel</h1>
<table width=100%><tr><td align=left>control panel</td><td
align=right><b><%=se\
ssion.value('authenticated_user',None)%></b>(<a href = /Auth/logout.psp>log
out\
</a>)</td></tr></table>
<hr>
The problem I'm having is this:
When I go to cp.mysite.com/index.psp as a user that isn't logged in, it
works fine. The page redirects me to /Auth/login.psp. Logging in works fine,
etc.
However, when I visit admin.mysite.com/index.psp as a user that isn't logged
in, I don't get redirected, I get an error page because webware is trying to
display session.value('authenticated_user') in the page. However, if I cut
out the html in the page, and just leave the redirect snippet, the page
works fine. Any ideas on what I should change or how I can debug this?
Thanks,
Rolf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss