uWSGI mount point

152 views
Skip to first unread message

Jim Karsten

unread,
Aug 17, 2022, 5:39:24 PM8/17/22
to py4web
I am setting up py4web with uWSGI. For web2py, the configuration required a "module = wsgihandler" pointing uWSGI to the wsgihandler.py file. Is there an equivalent in py4web?

Thanks,
Jim 

Jim Steil

unread,
Aug 17, 2022, 5:55:42 PM8/17/22
to py4web
I'm not using uwsgi with py4web.  You should be able to setup directly with nginx.

I deploy on Ubuntu and use the py4web/development_tools/ubuntu/machine-setup.sh script as a model to setup nginx and py4web.

I'm out for the rest of the day but can help more tomorrow if you're using Ubuntu.

-Jim

Massimo

unread,
Aug 18, 2022, 3:35:46 AM8/18/22
to py4web
I agree with Jim that you do not need uwsgi but, in any case, py4web is a wsgi app and you can access do what you want as follows

from py4weby.code import wsgi
module = wsgi(password_file="password.txt",  dashboard_mode="full", apps_folder="apps")

You may need to specify the full absolute paths to password_file and apps_folder.

Jim Karsten

unread,
Aug 18, 2022, 5:33:00 PM8/18/22
to py4web
Thanks Jim and Massimo.
I adapted the nginx configuration and init.d script from machine-setup.sh and now have it running.  I use archlinux with systemd, so I needed to create a systemd start/stop script, but it was pretty easy to convert the init.d script.

Thanks again and cheers,
Jim

Dave S

unread,
Sep 30, 2022, 5:54:30 PM9/30/22
to py4web
Off topic Google Groups complaint ....  sometimes using the "<? control to move to the next thread sends my back to the web2py forums.  Happened with this thread just now.  Awkward.

/dps
Reply all
Reply to author
Forward
0 new messages