I give up! couldnt make it run ! and dont want to waste more time on cherokee. so, goodbye to cherokee !
I have setup django + uwsgi + nginx successfully and needless to say, nginx configuration is much simpler and clear! in comparison to cherokee. anyway, thanks a lot for all the help. regards, KM On Thu, Jan 27, 2011 at 9:25 PM, km <[email protected]> wrote: > > Hi Ivo, > > As u suggested, I have tested on commandline (as normal user) with: > > $pwd > $/home/km > $ /usr/local/bin/uwsgi -s /tmp/myproject.sock -M -z 4 -l 128 -C -p 4 > --pythonpath /usr/local/lib/python2.6/dist-packages --pythonpath > /home/km/myproject DJANGO_SETTINGS_MODULE=myproject.settings -w > myproject.django_wsgi --http :9000 > ########################################### > ** Starting uWSGI 0.9.6.6 (32bit) on [Thu Jan 27 21:06:02 2011] *** > > compiled with version: 4.4.5 > Python version: 2.6.6 (r266:84292, Sep 15 2010, 16:02:57) > [GCC 4.4.5] > your memory page size is 4096 bytes > binding on TCP port: 9000 > starting HTTP loop on sodasi (pid: 17930) > > allocated 412 bytes (0 KB) for 1 request's buffer. > binding on UNIX socket: /tmp/myproject.sock > chmod() socket to 666 for lazy and brave users > your server socket listen backlog is limited to 128 connections > added /usr/local/lib/python2.6/dist-packages to pythonpath. > > added /home/km/myproject to pythonpath. > initializing hooks...done. > ...getting the applications list from the 'myproject.django_wsgi' module... > > application 0 (/) ready > setting default application to 0 > spawned uWSGI master process (pid: 17931) > spawned uWSGI worker 1 (pid: 17932) > spawned uWSGI worker 2 (pid: 17933) > spawned uWSGI worker 3 (pid: 17934) > spawned uWSGI worker 4 (pid: 17935) > ################################# > yes! I was able to access my project app with localhost:9000 on a > browser!!! this works great from command line. > > But I had to "import uwsgi" module in addition to make it work, like this > myproject/django_uwsgi.py contents: > ############################ > > import os > import django.core.handlers.wsgi > import uwsgi # added > os.environ['DJANGO_SETTINGS_MODULE'] = 'japan.settings' > > application = django.core.handlers.wsgi.WSGIHandler() > uwsgi.applications = {'/':application,} > ############################ > > But now when I use the same command for interpreter of my virtualhost > setting via cherokee-admin. things do not seem to work :-( > my /etc/cherokee/cherokee.conf is > > ( cherokee is running as user/group "www-data" > and "myproject" has permissions 755 for dirs and 644 for files like this > $ ls -ld myproject > drwxr-xr-x 4 km www-data 4096 2011-01-27 21:21 myproject > ) > > ############################### > config!version = 001000018 > server!bind!1!port = 80 > server!collector = rrd > server!group = www-data > server!keepalive = 1 > server!keepalive_max_requests = 500 > server!panic_action = /usr/local/bin/cherokee-panic > server!pid_file = /var/run/cherokee.pid > server!server_tokens = full > server!timeout = 15 > server!user = www-data > vserver!10!collector!enabled = 1 > vserver!10!directory_index = index.html > vserver!10!document_root = /var/www > vserver!10!error_writer!filename = /var/log/cherokee.error > vserver!10!error_writer!type = file > vserver!10!logger = combined > vserver!10!logger!access!buffsize = 16384 > vserver!10!logger!access!filename = /var/log/cherokee.access > ... > vserver!20!document_root = /home/km/myproject/static > vserver!20!error_writer!filename = /var/log/cherokee.error > vserver!20!error_writer!type = file > vserver!20!logger = combined > vserver!20!logger!access!buffsize = 16384 > vserver!20!logger!access!filename = /var/log/cherokee.access > vserver!20!logger!access!type = file > vserver!20!nick = www.myplint.com > vserver!20!rule!30!encoder!deflate = 0 > vserver!20!rule!30!encoder!gzip = 0 > vserver!20!rule!30!expiration = time > vserver!20!rule!30!expiration!time = 1h > vserver!20!rule!30!handler = file > vserver!20!rule!30!handler!iocache = 1 > vserver!20!rule!30!match = fullpath > vserver!20!rule!30!match!fullpath!1 = /favicon.ico > vserver!20!rule!30!match!fullpath!2 = /robots.txt > vserver!20!rule!30!match!fullpath!3 = /crossdomain.xml > vserver!20!rule!30!match!fullpath!4 = /sitemap.xml > vserver!20!rule!30!match!fullpath!5 = /sitemap.xml.gz > vserver!20!rule!20!expiration = time > vserver!20!rule!20!expiration!time = 7d > vserver!20!rule!20!handler = file > vserver!20!rule!20!match = directory > vserver!20!rule!20!match!directory = /media > vserver!20!rule!10!encoder!gzip = 1 > vserver!20!rule!10!handler = uwsgi > vserver!20!rule!10!handler!balancer = round_robin > vserver!20!rule!10!handler!balancer!source!10 = 51 > vserver!20!rule!10!handler!check_file = 0 > vserver!20!rule!10!handler!error_handler = 1 > vserver!20!rule!10!match = default > source!51!env_inherited = 1 > source!51!host = /tmp/myproject.sock > source!51!interpreter = /usr/local/bin/uwsgi -s /tmp/japan.sock -M -z 4 -l > 128 -C -p 1 --pythonpath /usr/local/lib/python2.6/dist-packages > --pythonpath /home/km/myproject --env > DJANGO_SETTINGS_MODULE=myproject.settings -w japan.django_wsgi > source!51!nick = Django 51 > source!51!type = interpreter > icons!default = page_white.png > icons!directory = folder.png > ... > ############################### > > Is it an issue with permissions ? pls let meknow. > thanks > regards, > KM > > > On Thu, Jan 27, 2011 at 5:41 PM, Ivo Brodien <[email protected]> wrote: > >> Did you get it to work? >> >> I did the following and it works: >> >> Interpeter command: >> >> /usr/bin/uwsgi -s /path_to/myproject/mysite.sock -M -z 4 -l 128 -C -p 1 >> --pythonpath /path_to/ --pythonpath /path_to/myproject --env >> DJANGO_SETTINGS_MODULE=myproject.settings -w myproject.django_wsgi >> >> django_wsgi: >> >> import os >> import django.core.handlers.wsgi >> >> os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings' >> application = django.core.handlers.wsgi.WSGIHandler() >> applications = {'/':'application', } >> >> Good Luck! >> >> >> >
_______________________________________________ Cherokee mailing list [email protected] http://lists.octality.com/listinfo/cherokee
