Hi,
sorry I was offline for last couple of days

Green:
here are config files:
http://luke.jottit.com/webpy_%2B_nginx

rkmr.em:
i'll try to run webpy with loadbalancer this week and let you know


On 17 Lis, 14:02, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> lukasz,
> can you give the complete nginx configuration file?
>
> On Sep 20, 2007 1:00 AM, lukaszt <[EMAIL PROTECTED]> wrote:
>
>
>
> > I've got nginx+spawn-fcgi+web.py on Ubuntu Feisty working.
> > Can somebody review this config please?
>
> > MySQL:
> > sudo apt-get install mysql-server-5.0 libmysqlclient15-dev
>
> > Python/web.py:
> > sudo apt-get install python-dev python-setuptools
> > sudo easy_install web.py Mako MySQL-python python-cjson
>
> > Nginx:
> > sudo apt-get install nginx
>
> > spawn-fcgi:
> > wgethttp://www.lighttpd.net/download/lighttpd-1.4.18.tar.bz2
> > tar -xvjf lighttpd-1.4.18.tar.bz2
> > cd lighttpd-1.4.18
> > make
> > cp src/spawn-fcgi /usr/bin/spawn-fcgi
>
> > ---
>
> > Files:
>
> > I've created run.sh file inside project dir to run fcgi app:
>
> > run.sh
> > <code>
> > #!/bin/sh
> > /usr/bin/spawn-fcgi -f <PATH_TO_MAIN_SOURCE_FILE> -a 127.0.0.1 -p 8081
> > </code>
>
> > Path to this file is also appended to /etc/rc.local
>
> > Part of /etc/nginx/nginx.conf inside http section:
> > <code>
> >    server {
> >        listen       80;
> >        server_name  something.local;
> >        location / {
> >            fastcgi_pass 127.0.0.1:8081;
> >            include /etc/nginx/fastcgi_params;
> >            root    <PATH_TO_ROOT_PROJECT_LOCATION>;
> >            fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;  # [1]
> >            fastcgi_param PATH_INFO $fastcgi_script_name;        # [2]
> >        }
> >    }
> > </code>
>
> > Part of /etc/hosts:
> > <code>
> > 127.0.0.1     something.local
> > </code>
>
> > main.py:
> > <code>
> > #!/usr/bin/env python
> > # -*- coding: utf-8 -*-
>
> > import web
>
> > urls = (
> >    r"^/(.*)$", "index",
> > )
>
> > class index:
> >    def GET(self, *args):
> >        print args
>
> > web.webapi.internalerror = web.debugerror
>
> > if __name__ == "__main__":
> >    web.wsgi.runwsgi = lambda func, addr=None: web.wsgi.runfcgi(func,
> > addr)
> >    web.run(urls, globals(), web.reloader)
> > </code>
>
> > ---
>
> > [1] is modified line from nginx wiki
> > [2] after adding this line web.py sterted to work
>
> > Now I'm not sure if it's configured properly. Everything seems to work
> > ok.
> > Is [1] and [2] inside /etc/nginx/nginx.conf done right?
> > Thanks for help.
>
> > Regards
> > Ɓukasz
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to