Hi!

Has anybody actually managed to configure nginx + mod_wsgi to work
with pylons? I manage to load static content from public directory,
but for some reason I can't get requests to map to controllers and
actions. Is there any special tricks needed for development.ini or
startup_script.wsgi?

My startup wsgi look now like this:

import os, sys
sys.path.append('/home/user/mysite')

os.environ['PYTHON_EGG_CACHE'] = '/home/user/mysite/temp'

from paste.deploy import loadapp
application = loadapp("config:/home/user/mysite/development.ini")

and nginx server configure:

worker_processes  2;
daemon on;
master_process  on;

error_log  logs/error.log debug;
pid        logs/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       conf/mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] $request '
    #                  '"$status" $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    gzip  off;

    wsgi_python_optimize 0; # pylons uses doc strings...
    wsgi_python_executable /usr/bin/python;
    wsgi_python_home /usr/;
    wsgi_python_path /home/user/mysite;
    wsgi_enable_subinterpreters on;

    server {
        listen       1080;
        server_name  localhost;

        include conf/wsgi_params;

        location / {
            #client_body_buffer_size 50;
            wsgi_alias /home/user/mysite/mysite.wsgi;
            wsgi_pass_authorization off;
            wsgi_script_reloading off;
            wsgi_use_main_interpreter off;
            wsgi_callable_object application;
        }
}

Mikael Lepistö

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to