Thanks for reply Graham!
So, I readed http://code.google.com/p/modwsgi/wiki/ProcessesAndThreading
http://blog.dscpl.com.au/2012/10/why-are-you-using-embedded-mode-of.html
according to that, I think that directive: 

WSGIDaemonProcess test threads=15 

Running embedded mode with a single process. I'm right or not?

Also, I noticed that session files isn't created in /sessions folder while 
I'm requestig /count page
and added my uid and gid to previous directive:

WSGIDaemonProcess test_1 user = #1001 group = #1001 threads=15 

I checked if user with uid 1001 have read/write rights in folder.

And sessions still dont work...

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

<VirtualHost *:8080>

        DocumentRoot /var/www/webpy-app/documents

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

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

        WSGIDaemonProcess test user=#1001 group=#1001 threads=15           
          

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

        ErrorLog ${APACHE_LOG_DIR}/error.log

        LogLevel info

        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>


On Tuesday, August 5, 2014 11:33:00 PM UTC+4, Shatskiy Kirill wrote:
>
> 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