There nothing wrong in principle with your configuration and we know
of users who use it in a similar configurations. two things can be
wrong: permissions, url rewriting.

When you say it does not work, what do you see? What kind of problems
do you experience?

Massimo

On Apr 3, 10:14 am, Alex Quinn <[email protected]> wrote:
> I spent 6 fruitless hours yesterday trying to get Web2py working on my
> hosting service:  a CentOS VPS running Apache 2.0.52, Python 2.7,
> mod_wsgi 3.3 (latest), and web2py 1.94.6 (latest stable).  I need it
> to run in a subdirectory since I use the server for other things.
> After trying everything within reason and reading everything I can
> find, I'm rapidly coming to the conclusion that web2py just doesn't
> work in this configuration.  If somebody can get me unstuck, I would
> be *very* appreciative.  If there is a reason why this is impossible
> or if there is some needed modification to the instructions, maybe it
> would be good to document that in order to save others from the same
> frustration.  I'd be happy to help with that.
>
> ____________________________________________________________
> ERRORS SEEN:
> - 503 : "(13)Permission denied: mod_wsgi (pid=10472): Unable to
> connect to WSGI daemon process 'web2py' on '/etc/httpd/logs/wsgi.
> 7370.102.1.sock' after multiple attempts." ... received when 
> visitinghttp://example.com/web2py-apps/
> - 403 : "client denied by server configuration: /home/siteadmin/web2py/
> wsgihandler.pywelcome" ... received when 
> visitinghttp://example.com/web2py-apps/welcome/default/index/
>
> ____________________________________________________________
> WHAT WORKS:
> - mod_wsgi works with a simple hello.py WSGI script.
> - Running web2py by running "python web2py.py" works.
> - Running web2py via wsgiref.simple_server.WSGIServer, started by my
> own script, works.
>
> ____________________________________________________________
> ALREADY TRIED:
> - I started with the Apache configuration in the book 
> (http://web2py.com/book/default/chapter/11#mod_wsgi) modified so that
> it runs in a subdirectory (i.e., "/web2py-apps/" instead of "/").
> That gave me the above errors.
> - Verified that mod_wsgi is getting Python 2.7.
> - Tried temporarily setting it to live in the server's root.  Same
> errors.
> - Checked that Apache can read the directory where web2py lives.
> - Verified that mod_wsgi works and web2py works.  I just can't make
> them work together.
> - Looked at Graham Dumpleton's blog posts and other pages about this.
>
> ____________________________________________________________
> CONFIGURATION:
> WSGIPythonHome /usr/local/python/python2.7
> # ...
> <VirtualHost ###.###.###.###:80>
> # ...
> WSGIDaemonProcess web2py user=siteadmin group=siteadmingroup display-
> name=%{GROUP}
> WSGIProcessGroup web2py
> WSGIScriptAlias /web2py-apps/ /home/siteadmin/web2py/wsgihandler.py
> <Directory /home/siteadmin/web2py>
>     AllowOverride None
>     Order Allow,Deny
>     Deny from all
>     <Files wsgihandler.py>
>         Allow from all
>     </Files>
> </Directory>
> # (and also the stuff about static directories and admin panels)
> # ...
> </VirtualHost>
>
> ____________________________________________________________
> QUESTIONS:
> - Has anybody ever gotten web2py working in a subdirectory 
> (i.e.,http://example.com/web2py-apps/welcome) with mod_wsgi?  Some things I
> read while searching indicated this isn't possible without intensive
> customization.
> - Has anybody ever gotten web2py working with CentOS?  Some things I
> read while searching indicated web2py doesn't work well with CentOS.
> One person changed providers for that reason.
> - Would mod_proxy be more fool-proof?  Given the time and frustration
> spent trying to make it work with mod_wsgi, I am reluctant to try a
> totally different strategy unless there's reason to believe it would
> be easier.
>
> I am totally new to Web2py and I was very impressed when running
> locally.  Right now, I'm frustrated.  When I got started, it looked
> like this was going to be much easier.  Maybe just bad luck that I
> happen to be on a CentOS server.  I don't know.  Anyway, if anybody
> could give me a pointer, I'd really appreciate it.  If I ever get it
> working, I'll definitely write back with a HOWTO.
>
> Thanks,
> Alex

Reply via email to