Hello
I to have a webfaction account. I had the same problem with setting
web.py up and as my boss has gone to the pub, I had another look.
I have got the basic app from the docs working.
This is my httpd.conf
ServerRoot "/home/whaity/webapps/py/apache2"
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule wsgi_module modules/mod_wsgi.so
DirectoryIndex index.py
DocumentRoot /home/whaity/webapps/py/htdocs
KeepAlive Off
Listen 24091
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-$
CustomLog /home/whaity/logs/user/access_py.log combined
ErrorLog /home/whaity/logs/user/error_py.log
ServerLimit 2
And the code.py file is the same but, with the following
app = web.application(urls, globals(), autoreload=False)
application = app.wsgifunc()
As per the cookbook.
Note that you need to go to /code.py/ for it to work but, you can
change this by using rewrite rules with apache. See the cookbook
http://webpy.org/install#apachemodwsgi
I hope this helps.
Oh for an working example see http://whaity.webfactional.com/code.py/
Better get back to work ;)
whaity
On Thu, Mar 18, 2010 at 5:35 PM, Ken Dere <[email protected]> wrote:
> HI,
>
> I have been developing a python web app on my local machine with
> web.py
> and that has run nicely. I have an account with webfaction and have
> tried setting it up there but so far I haven't gotten it to work.
>
> Webfaction set's you up with an initial index.py in my htdocs
> directory
> and it works so I think I have Apache set up OK
>
> http://web.chiantidatabase.org/index.py
>
> this is their index.py.
>
> ------------------------------------------------------------------
>
> import sys
>
> def application(environ, start_response):
> output = 'Welcome to your mod_wsgi website! It uses:\n\nPython %s'
> %
> sys.version
>
> response_headers = [
> ('Content-Length', str(len(output))),
> ('Content-Type', 'text/plain'),
> ]
>
> start_response('200 OK', response_headers)
>
> return [output]
>
> ----------------------------------------------------------------
>
> I tried following the steps in the cookbook for mod_wsgi-apache but
> that
> has not helped yet
>
> for one thing, httpd.conf does not accept the command 'Alias'
>
> I do define application = web.application(urls, globals()).wsgifunc()
>
> any help would be appreciated
>
> Ken
>
> --
> You received this message because you are subscribed to the Google Groups
> "web.py" 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/webpy?hl=en.
>
>
--
< whaity >
--
You received this message because you are subscribed to the Google Groups
"web.py" 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/webpy?hl=en.