Hello!
Accodrding to example on http://webpy.org/cookbook/mod_wsgi-apache I tried 
to build test application 
and configure apache. I have problem with sessions, they seem not working 
because counter isn't incremented 
when I request /count page. Also, I tried to use DBStore instead of 
DiskStore and got the same result.
I assume that problem somewhere in Apache. In default Apache 2.2. config 
I'd just change site-availiable/default. 

Apache 2.2, webpy 0.37, latest mod_wsgi and Ubuntu 12.04

---------code.py----------
import web
import os

urls = (

'/count', 'count',
'/reset', 'reset'

)

web.config.debug = False
app = web.application(urls, globals())
curdir = os.path.dirname(__file__)
session = web.session.Session(app, 
web.session.DiskStore(os.path.join(curdir,'sessions')),initializer = 
{'counter': 0})

application = app.wsgifunc()

class count:
    def GET(self):
        session.counter += 1
        return str(session.counter)

class reset:
    def GET(self):
        session.kill()
        return ""

-------Apache config-------------

<VirtualHost *:80>

        DocumentRoot /var/www/webpy-app/
        WSGIScriptAlias / /var/www/webpy-app/code.py/

        Alias /appname/static /var/www/webpy-app/static/
        AddType text/html .py

        <Directory /var/www/webpy-app/>
            Order deny,allow
            Allow from all
        </Directory>

       ErrorLog ${APACHE_LOG_DIR}/error.log

       # Possible values include: debug, info, notice, warn, error, crit,
       # alert, emerg.
       LogLevel debug

       CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to