it is working. Pythonanywhere.com folks were really helpful.
There was so much trial and error I don't which of the below processes was
responsible for success and what might be inefficient.
Put routes.py under web2py main directory: / > home > alexglaros > web2py >
routes.py NOT UNDER YOUR SPECIFIC APP LIKE THIS: / > home > alexglaros
> web2py > applications > engagementsquared > routes.py
#!/usr/bin/python
# -*- codingf-8 -*-
routers = dict(
# base router
BASE=dict(
default_application='engagementsquared',
domains={'www.engagementsquared.com':'engagementsquared'}
),
)
create this file according to their website directions: WSGI configuration
file:
/var/www/www_engagementsquared_com_wsgi.py
<https://www.pythonanywhere.com/user/alexglaros/files/var/www/www_engagementsquared_com_wsgi.py?edit>
import os
import sys
# add your project directory to the sys.path
project_home = u'/home/alexglaros/web2py/'
if project_home not in sys.path:
sys.path = [project_home] + sys.path
sys.stdout = sys.stderr
os.chdir(project_home)
# serve web2py via WSGI handler
from gluon.main import wsgibase as application
At hostmonster.com, here is advice from pythonanywhere.com support:
PythonAnywhere web apps for specific domains. If you go to
www.engagementsquared.com, you'll see a PythonAnywhere "coming soon" page.
This means that you've set up the CNAME for www.engagementsquared.com
correctly -- the HTTP redirect problem is only with the version without the
www. But you only have a web up set up on PythonAnywhere for
alexglaros.pythonanywhere.com. This page explains how to set things up so
that you can serve an existing web app on a new domain:
<https://www.pythonanywhere.com/wiki/UsingANewDomainForExistingWebApp>
Did above,then back at pythonanywhere.com site was careful to choose
"manual configuration", not "create a new Web2py app". Easy to miss that.
So even though I had an app running, I still had to choose "Add a new app".
Finally, hit the "reload app" button and instant success. Both stripped
URL "engagementsquared.com" and with a "www" www.engagmentsquared.com work.
Alex
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.