Yet, another update.
I take that back, I think I was just seeing the file being displayed
as regular HTML (so it really didn't work).
All I can tell is it has to be something with my config file...

I noticed on what the tutorial said to add, it mentioned the following

WSGIScriptAlias /appname /var/www/webpy-app/code.py/

I am running my stuff out of /etc/apache2/sites-available/www
Does that make a difference?  There is no file named "webpy-app" in /
var/www



On Aug 10, 8:52 pm, Brian <bsac...@gmail.com> wrote:
> Ok, here is an update,
> I changed the config file to what was on the webpy tutorial (http://
> webpy.org/cookbook/mod_wsgi-apache).
> Is the project name just the name of the file with out the .py?  (Im
> my case "testcode").
>
> I also put the html file up a directory and told the code to look up
> one directory as well.
> I saw the code run but I cannot get it to run again (even though I
> think I am doing the exact same thing that made it work).
>
> ???
>
> On Aug 10, 7:41 am, Brian <bsac...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I still get a "not found" when looking at the index page after making
> > your suggested changes.
> > The log now looks like....
>
> > [Wed Aug 10 07:38:35 2011] [notice] caught SIGTERM, shutting down
> > [Wed Aug 10 07:38:36 2011] [notice] mod_python: Creating 8 session
> > mutexes based on 150 max processes and 0 max threads.
> > [Wed Aug 10 07:38:36 2011] [notice] mod_python: using mutex_directory /
> > tmp
> > [Wed Aug 10 07:38:36 2011] [notice] Apache/2.2.14 (Ubuntu) PHP/
> > 5.3.2-1ubuntu4.9 with Suhosin-Patch mod_python/3.3.1 Python/2.6.5
> > mod_wsgi/2.8 configured -- resuming normal operations
>
> > To be honest, I am not sure what most of that means.
>
> > On Aug 10, 1:54 am, andrei <andre...@gmail.com> wrote:
>
> > > import os
> > > template_dir = os.path.abspath(os.path.dirname(__file__)) + "/
> > > templates"
> > > render = web.template.render(template_dir)
>
> > > On Aug 10, 6:19 am, Brian <bsac...@gmail.com> wrote:
>
> > > > I am newer to webpy so please forgive my if my phrasing is off.
>
> > > > I have  code and a template that work on my local machine.
> > > > I am trying to deploy them on my server using mod_wsgi.
>
> > > > I was following the tutorial on webpy.org but when I set everything up
> > > > for the templates the web page only returned "not found".
>
> > > > Below you can find the code I am using and the error logs.
>
> > > > testcode.py
> > > > ----------------
> > > > import web
>
> > > > urls = ('/', 'index')
> > > > render = web.template.render('templates/')
> > > > app = web.application(urls, globals())
>
> > > > class index:
> > > >     def GET(self):
> > > >         name = 'Leo'
> > > >         return render.index(name)
>
> > > > if __name__ == "__main__":
> > > >         app.run()
>
> > > > app = web.application(urls, globals(), autoreload=False)
> > > > application = app.wsgifunc()
>
> > > > index.html
> > > > ---------------
> > > > $def with (name)
>
> > > > $if name:
> > > >     I just wanted to say <em>hello</em> to $name.
> > > > $else:
> > > >     <em>Hello</em>, world!
>
> > > > log
> > > > ------
> > > > [Tue Aug 09 21:24:18 2011] [error] [client xxx.xxx.xxx.xxx] mod_wsgi
> > > > (pid=6563): Target WSGI script '/etc/apache2/sites-available/www/
> > > > testcode.py' does not contain WSGI application 'application'.

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to webpy@googlegroups.com.
To unsubscribe from this group, send email to 
webpy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to