On Sep 9, 4:39 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> On Sep 10, 9:05 am, AZMel <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Sep 9, 3:55 pm, Graham Dumpleton <[EMAIL PROTECTED]>
> > wrote:
>
> > > Post your WSGI script file so we can see it.
>
> > > Also post the relevant configuration directives from the Apache
> > > configuration file for mod_wsgi setup so can see that as well.
>
> > > This way we can see exactly what you have done rather than you saying
> > > what you have done. You could have done something trivially wrong for
> > > all we know but you might think it is okay.
>
> > > Graham
>
> > > On Sep 10, 12:34 am, AZMel <[EMAIL PROTECTED]> wrote:
>
> > > > On Sep 8, 9:29 pm, Graham Dumpleton <[EMAIL PROTECTED]>
> > > > wrote:
>
> > > > > On Sep 9, 1:54 pm, AZMel <[EMAIL PROTECTED]> wrote:
>
> > > > > > On Sep 8, 8:29 pm, Graham Dumpleton <[EMAIL PROTECTED]>
> > > > > > wrote:
>
> > > > > > > On Sep 9, 1:08 pm, AZMel <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > On Sep 8, 7:53 pm, "Lukasz Szybalski" <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > On Mon, Sep 8, 2008 at 9:43 PM, AZMel <[EMAIL PROTECTED]> 
> > > > > > > > > wrote:
>
> > > > > > > > > > Hello All,
>
> > > > > > > > > >    I'm at a bit of a loss and I now turn to you for help.
>
> > > > > > > > > >    I have an application that works perfectly in dev mode 
> > > > > > > > > > and it
> > > > > > > > > > works fine when I manually start  
> > > > > > > > > > /usr/lib/cgi-bin/myapp-autostart.cgi
>
> > > > > > > > > Not sure why you use cgi instead ofmod_wsgi, but you could try
> > > > > > > > > starting your app on production server /usr/bin/start-myapp.py
> > > > > > > > > prod.cfg and see if you get an error.
>
> > > > > > > > Last year when I was looking for a way to autostart that was 
> > > > > > > > the only
> > > > > > > > way I could find that worked for me.  I will look intomod_wsgi
> > > > > > > > though.  Any recommendations on the best tut's to use?
>
> > > > > > > Is the officialmod_wsgidocumentation not enough?
>
> > > > > > >  http://code.google.com/p/modwsgi/wiki/InstallationInstructions
> > > > > > >  http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
> > > > > > >  http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines
>
> > > > > > >  http://code.google.com/p/modwsgi/wiki/IntegrationWithTurboGears
>
> > > > > > > And much much more at:
>
> > > > > > >  http://code.google.com/p/modwsgi/w/list
>
> > > > > > > Graham
>
> > > > > > Truthfully, before tonight I never heard of it.  I had my stuff
> > > > > > running with a cgi script so I was happy.  Now if the TG document 
> > > > > > page
> > > > > > had mentioned this it would have made life much easier.  I'm going 
> > > > > > to
> > > > > > look into implementing it in the morning.  Right now I'm too 
> > > > > > flustered
> > > > > > with this 500 error that I cannot debug.  You might be hearing back
> > > > > > from me for help, maybe not.  :-D
>
> > > > > Themod_wsgipackage is mentioned and directly/indirectly linked off:
>
> > > > >  http://docs.turbogears.org/1.0/Deployment
> > > > >  http://docs.turbogears.org/2.0/Deployment
>
> > > > > I agree though that there are many options listed there and not
> > > > > obvious why one would use one over another.
>
> > > > > Graham
>
> > > > I followed the directions for the 1.0 deployment but get a 404 error.
> > > > The path '/' was not found.
>
> > > > [Tue Sep 09 07:14:42 2008] [notice] Apache/2.2.4 (Ubuntu) PHP/
> > > > 5.2.3-1ubuntu6.4 proxy_html/2.5 mod_ssl/2.2.4 OpenSSL/0.9.8emod_wsgi/
> > > > 2.0 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal
> > > > operations
> > > > [Tue Sep 09 07:15:04 2008] [warn]mod_wsgi(pid=31143): Callback
> > > > registration for signal 15 ignored.
> > > > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/local/turbogears/myapp/
> > > > apache/myapp.wsgi", line 9, in <module>
> > > > [Tue Sep 09 07:15:04 2008] [warn]     import cherrypy
> > > > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> > > > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/__init__.py", line 20, in
> > > > <module>
> > > > [Tue Sep 09 07:15:04 2008] [warn]     import _cpserver
> > > > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> > > > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpserver.py", line 10, in
> > > > <module>
> > > > [Tue Sep 09 07:15:04 2008] [warn]     from cherrypy._cpengine import
> > > > Engine, STOPPED, STARTING, STARTED
> > > > [Tue Sep 09 07:15:04 2008] [warn]   File "/usr/lib/python2.5/site-
> > > > packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpengine.py", line 25, in
> > > > <module>
> > > > [Tue Sep 09 07:15:04 2008] [warn]     signal.signal(signal.SIGTERM,
> > > > SIGTERM)
> > > > [Tue Sep 09 07:15:06 2008] [error] Identity starting
> > > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > > "stumbaugh.model.User"
> > > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > > "stumbaugh.model.Group"
> > > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > > "stumbaugh.model.Permission"
> > > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > > "stumbaugh.model.VisitIdentity"
> > > > [Tue Sep 09 07:15:06 2008] [error] Identity visit plugin initialised
> > > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > > "stumbaugh.model.User"
> > > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > > "stumbaugh.model.Group"
> > > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > > "stumbaugh.model.Permission"
> > > > [Tue Sep 09 07:15:06 2008] [error] Succesfully loaded
> > > > "stumbaugh.model.VisitIdentity"
> > > > [Tue Sep 09 07:15:06 2008] [error]  - - "GET / HTTP/1.1" 404 714 ""
> > > > "Links (1.00pre12; Linux 2.6.22-14-server i686; 207x56) (Debian pkg
> > > > 0.99+1.00pre12-1.2)"
>
> > > > my wsgi file is the same as the one in the 1.0 deployment doc with the
> > > > exception of myapp being used where needed.
>
> > > > I will say the guide was extremely easy to follow.  Nice work.  Now if
> > > > I can get the page to serve.....
>
> > > > Mel
>
> > most current webapps.wsgi
>
> > import sys
> > sys.path.append('/usr/local/turbogears/myclient')
> > sys.stdout = sys.stderr
>
> > import os
> > #os.environ['PYTHON_EGG_CACHE'] = '/usr/local/turbogears/myclient'
>
> > import atexit
> > import cherrypy
> > import cherrypy._cpwsgi
> > import turbogears
>
> > turbogears.update_config(configfile="/usr/local/turbogears/myclient/
> > prod.cfg", modulename="myclient.config")
> > turbogears.config.update({'global': {'server.environment':
> > 'production'}})
> > turbogears.config.update({'global': {'autoreload.on': False}})
> > turbogears.config.update({'global': {'server.log_to_screen': True}})
>
> > #For non root mounted app:
> > turbogears.config.update({'global': {'server.webpath': '/'}})
>
> > import myclient.controllers.root
> > import myclient.controllers.reports
>
> > cherrypy.root = myclient.controllers.Root()
>
> > if cherrypy.server.state == 0:
> >     atexit.register(cherrypy.server.stop)
> >     cherrypy.server.start(init_only=True, server_class=None)
>
> > #For root mounted app
> > #application = cherrypy._cpwsgi.wsgiAppi
>
> > #For none-root mounted app
> > def application(environ, start_response):
> >     environ['SCRIPT_NAME'] = ''
> >     return cherrypy._cpwsgi.wsgiApp(environ, start_response)
>
> > most current apache webapps
>
> > Alias /static /usr/local/turbogears/myclient/myclient/static
>
> > WSGIScriptAlias /webapps /usr/local/turbogears/myclient/apache/
> > webapps.wsgi
>
> > <Directory /usr/local/turbogears/myclient/apache>
> > Order deny,allow
> > Allow from all
> > </Directory>
>
> > I sure hope you spot something I missed.  It's driving to drink.
>
> If you are going to use:
>
>   WSGIScriptAlias /webapps /usr/local/turbogears/myclient/apache/
> webapps.wsgi
>
> You need to have:
>
>   turbogears.config.update({'global': {'server.webpath': '/webapps'}})
>
> If it is instead mounted at root then you shouldn't set server.webpath
> (just to be safe).
>
> With those matching, then describe the behaviour you are seeing,
> indicating the URL being requested and what URL page is pushing back.
>
> Also indicate whether for code generating problem page, is using url()
> function described in:
>
>  http://docs.turbogears.org/1.0/GettingStarted/URLs
>
> being used or are you hard coding URLs in the generated pages.
>
> Graham

With /webapps put back into the server.webpath I get the following:

http://192.168.1.9/
    This gets redirected to apache2-default/

http://192.168.1.9/webapps/
    This comes up with a 404 error.  path '/' not found.

http://192.168.1.9/webapps/webapps/
    This comes up with the home page but no static content is sent
over.  Also tg,url('/') returns /webapps which I would have expected /
webapps/webapps.

Remember that the app was developed with / being returned from
tg.url('/').

There seems to be a missing path somewhere but I don't know where.

Mel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to