Hi Danny - Thanks for this.
Can you tell us a little more about this: - do you have a test web2py on webfaction using this now? how's it working? do you have a link to share? - can you say more about issue w/ static file handling (I don't see the issue just looking at the setup, so wondering what it is) Thanks much, Yarko On Jan 21, 4:41 pm, dhmorgan <dharrimanmor...@gmail.com> wrote: > I have now put the above content in the wiki under "web2py/Setup/" > > https://mdp.cti.depaul.edu/web2py_wiki/default/wiki/webfactionWSGI > > It misses some things I'll change soon -- static file handling in > particular; but this is a reasonably good start. > > On Jan 21, 4:11 pm, Timothy Farrell <tfarr...@swgen.com> wrote: > > > It would be really great if you could put in this in thewww.web2pywiki.com > > > dhmorgan wrote: > > > Settting up Web2py as WSGI onWebfaction > > > > Make available two subdomain names, one for adminstration, the other > > > for public display: > > > 'admin.example.com' > > > 'www.example.com' > > > > Create awebfactionapplication of type "mod_wsgi 2.0/Python 2.5": > > > 'apachewsgi' > > > > Create twowebfactionsites that : > > > 'mysite_admin' -- https enabled; subdomain 'admin.example.com'; > > > application 'apachewsgi' served at '/' > > > > 'mysite' -- *not* https enabled; subdomain 'www.example.com'; > > > application 'apachewsgi' served at '/' > > > > Get the latest web2py and copy it into ~/webapps/apachewsgi/: > > > cd ~/repos/svn #for example > > > svn checkouthttp://web2py.googlecode.com/svn/trunk/web2py-read- > > > only > > > svn export web2py-read-only ~/webapps/apachewsgi/web2py > > > > Edit ~/webapps/apachewsgi/apache2/conf/httpd.conf: > > > see listing below > > > > in the httpd.conf file, the port number for the app is in line: > > > "Listen NNNN" > > > > Create admin password: > > > in ~/webapps/apachewsgi/web2py: > > > python2.5 web2py -p NNNN # where NNNN is port number, no > > > quotes > > > > web2py will ask you for a password, which it will then store in a > > > file, 'parameters_NNNN.py' > > > > from another terminal, kill web2py process according to web2py's > > > output instructions > > > > Start your app: > > > ~/webapps/apachewsgi/apach2/bin/start > > > > Have fun ? > > > > ===== START httpd.conf listing ============================== > > > > ServerRoot "/home/[YOUR ACCOUNT]/webapps/apachewsgi/apache2" > > > > LoadModule dir_module modules/mod_dir.so > > > LoadModule env_module modules/mod_env.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 > > > > # above 6 are added bywebfaction; I added mod_alias and mod_access > > > LoadModule alias_module modules/mod_alias.so > > > LoadModule access_module modules/mod_access.so > > > > KeepAlive Off > > > Listen NNNN > > > > WSGIScriptAlias / /home/[YOUR ACCOUNT]/webapps/apachewsgi/web2py/ > > > wsgihandler.py > > > WSGIDaemonProcess web2py user=[YOUR ACCOUNT] group=[YOUR ACCOUNT] \ > > > home=/home/[YOUR ACCOUNT]/webapps/apachewsgi/web2py \ > > > processes=1 maximum-requests=1000 > > > > NameVirtualHost 127.0.0.1:NNNN > > > <VirtualHost 127.0.0.1:NNNN> > > > ServerNamewww.example.com > > > DocumentRoot /home/[YOUR ACCOUNT]/webapps/apachewsgi/web2py/ > > > applications > > > <Directory /> > > > Options FollowSymLinks > > > AllowOverride None > > > </Directory> > > > <Directory /home/[YOUR ACCOUNT]/webapps/apachewsgi/> > > > Options Indexes FollowSymLinks MultiViews > > > AllowOverride None > > > Order allow,deny > > > allow from all > > > </Directory> > > > </VirtualHost> > > > > <VirtualHost 127.0.0.1:NNNN> > > > ServerName admin.example.com > > > DocumentRoot /home/[YOUR ACCOUNT]/webapps/apachewsgi/web2py/ > > > applications/admin > > > <Directory /> > > > Options FollowSymLinks > > > AllowOverride None > > > </Directory> > > > <Directory /home/[YOUR ACCOUNT]/webapps/apachewsgi/> > > > Options Indexes FollowSymLinks MultiViews > > > AllowOverride None > > > Order allow,deny > > > allow from all > > > </Directory> > > > </VirtualHost> > > > > LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" > > > \ > > > \"%{User-Agent}i\"" combined > > > CustomLog logs/access_log combined > > > ServerLimit 2 > > > > ===== END httpd.conf listing ============================== > > > > particular thanks to 'johanm' for post to web2py discussion group, > > > "mod_wsgi deployment question" -- > > >http://groups.google.com/group/web2py/b…12fcb8c94b > > > > Danny > > > > p.s. If you're looking for help setting up a development web2py > > > server, that's also doable; write me and I'll post a how-to > > > -- > > Timothy Farrell <tfarr...@swgen.com> > > Computer Guy > > Statewide General Insurance Agency (www.swgen.com) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---