Updates:
1) On production I am not using the XML style configuration file as I was
having problems with it. Instead I have set the file /etc/default/uwsgi
inside this file you need two lines (you can also place other
configuration) PYTHONPATH=path_to_web_2_py_project and MODULE=wsgihandler

/etc/default/uwsgi
-------------------------------
PYTHONPATH=/home/developer/projects/yaw
MODULE=wsgihandler

2) It is important to note which ever user you set uwsgi to start as ALL of
your files in your project need to be owned by that user other wise the
process will not start. This may be the reason you do not see the
uwsgi daemon.

Try this:
cd path_of_web2py_project
type: uwsgi  uwsgi --socket 127.0.0.1:3031 -w wsgihandler.py

Also very important make sure you set wsgihandler to be executable as by
default is is not.
chmod +x wsgihandler.py

3) Finally look at the nginx error logs I have found that the the uwsgi
error logs most of the time don't help however the nginx have provided me
with the access denied messages.

nginx:
server {
        listen       80;
        server_name  youadstage youadworld.com;
        access_log /home/developer/projects/logs/access.log main;
        error_log /home/developer/projects/logs/error.log;
        #limit_req   zone=gulag burst=200 nodelay;
        #charset koi8-r;
        rewrite ^(.*) https://new.youadworld.com$1 permanent;
        #access_log  logs/host.access.log  main;

        location /(\w+)/(\w+)/static/ {
            root /home/developer/projects/yaw/applications/;
        }


        location / {
            #root   html;
            #index  index.html index.htm;
            include uwsgi_params;
            uwsgi_pass 127.0.0.1:9001;
        }
}

server {
        listen          443;
        server_name     youadstage youadworld.com;
        ssl             on;
        ssl_certificate /home/developer/projects/yaw/settings/public.crt;
        ssl_certificate_key
/home/developer/projects/yaw/settings/youadworld.com.key;

        location / {
            uwsgi_pass  127.0.0.1:9001;
            include     uwsgi_params;
            uwsgi_param UWSGI_SCHEME $scheme;
        }
    }

Hopefully this helps a bit more.

--
Regards,
Bruce

On Fri, May 18, 2012 at 4:37 AM, Roberto De Ioris <robe...@unbit.it> wrote:

>
> Il giorno 18/mag/2012, alle ore 12:42, Lewis ha scritto:
>
> > Ran that command line.  Doesn't work.
> >
> > Instead of command line arg for processes, I put it in xml. does it
> matter?
>
> You mean running "ps aux" now shows
>
> /usr/local/bin/uwsgi -x /etc/uwsgi/uwsgi-conf.xml
>
> instead of the (wrong)
>
> /usr/local/bin/uwsgi -x /etc/uwsgi/uwsgi-conf.xml -p /var/run/uwsgi.pid
>
> ? (the second is wrong because -p takes a number, and in addition to that
> you have already specified the number of processes inthe xml file, so no
> need to
> double-use it)
>
> By the way try to follow that steps (run a ps aux after each step to be
> sue all is fine):
>
> 1) stop all (nginx, uwsgi)
> 2) run only nginx
> 3) from your terminal run (this is the minimal config for web2py)
>
> sudo /usr/local/bin/uwsgi --chdir /var/web2py/ --module wsgihandler
> --socket 127.0.0.1:9001
>
> (it means: move to /var/web2py/, load wsgihandler module and bind to
> socket 127.0.0.1:9001)
> Now visit your website with your browser. Does it work ?
>
> If it does not work double check if /var/web2py is the correct path of
> your web2py installation.
>
> --
> Roberto De Ioris
> http://unbit.it
> JID: robe...@jabber.unbit.it
>
>


-- 
-- 
Regards,
Bruce Wade
http://ca.linkedin.com/in/brucelwade
http://www.wadecybertech.com
http://www.fittraineronline.com - Fitness Personal Trainers Online
http://www.warplydesigned.com

Reply via email to