OK. edit mywsgiproject.wsgi and in it:
import sys
import os
sys.path.insert(0, '')
path = os.path.dirname(os.path.abspath(__file__))
if not path in sys.path:
sys.path.append(path)
sys.path.append(os.path.join(path,'site-packages'))
os.chdir(path)
import gluon.main
application = gluon.main.wsgibase
On Oct 5, 6:07 pm, Daniel Gildenlow <[email protected]> wrote:
> Fail with error 500
>
> No way to redirect from the myweb2pyproject.wsgi to wsgihandler.py?
>
> On 5 October 2010 17:43, mdipierro <[email protected]> wrote:
>
> > cd apps_wsgi/
> > cp wsgihandler.py myweb2pyproject.wsgi
>
> > then restart apache. It you have read/write parmissions in apps_wsgi/
> > you should be set.
>
> > On Oct 5, 2:03 pm, Daniel <[email protected]> wrote:
> > > Hi folks,
>
> > > I am new to web2py, so I am trying to deploy an small website.
>
> > > My server is a shared server, which supports WSGI apps, I can install
> > > an Django app form Cpanel, but I can't figure out how to to with
> > > web2py.
>
> > > At the control panel I choose:
> > > Create new WSGI project > *Others
>
> > > It creates my project under /apps_wsgi with one file and one folder.
>
> > > /apps_wsgi/
> > > /apps_wsgi/myweb2pyproject/
> > > /apps_wsgi/myweb2pyproject.wsgi
>
> > > I downloaded web2py from source code then unzipped to /apps_wsgi/
> > > myweb2pyproject/
>
> > > Now I can run web2py from shell using:
>
> > > cd /apps_wsgi/myweb2pyproject
> > > python2.6 web2py.py -a foobar
>
> > > It seens to be running well, I can interact with web2py by command
> > > shell using -S
>
> > > But, myweb2pyproject.wsgi is:
>
> > > import web
> > > urls = ( '/(.*)', 'hello' )
> > > class hello:
> > > def GET(self, name):
> > > print 'Welcome to your new WSGI project'
> > > application = web.wsgifunc(web.webpyfunc(urls, globals()))
>
> > > when I try to accesshttp://mydomain.com/I see:
>
> > > "welcome to your new WSGI project"
>
> > > what can I do to have this "myweb2pyproject.wsgi" starting my web2py
> > > application, without the need to require changes in apache.conf?
>
> > > Thanks
>
>