Over a year gone, I'm trying again, and still no luck.  At this point, I 
don't even get this error message anymore.  I just get a 500 error when 
trying to access the page.  I've also added in tips/tricks from:

https://groups.google.com/forum/#!searchin/web2py/hostmonster/web2py/h8uLiDCerx0/l5isz2ERWmcJ
and
https://groups.google.com/forum/#!searchin/web2py/hostgator/web2py/HvKqgkatK1E/0mFjGUYPjLYJ

with no luck.

My .htaccess looks like this:

AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteBase /
RewriteRule ^web2py\.fcgi/ - [L]
RewriteRule ^(.*)$ web2py.fcgi/$1 [L]

My routes_in and routes_out are as follows:


routes_in = (('/web2py/(?P<a>.*)','/\g<a>'),
    # do not reroute admin unless you want to disable it
    (BASE + '/admin', '/admin/default/index'),
    (BASE + '/admin/$anything', '/admin/$anything'),
    # do not reroute appadmin unless you want to disable it
    (BASE + '/$app/appadmin', '/$app/appadmin/index'),
    (BASE + '/$app/appadmin/$anything', '/$app/appadmin/$anything'),
    # do not reroute static files
    (BASE + '/$app/static/$anything', '/$app/static/$anything'),
    # reroute favicon and robots, use exable for lack of better choice
    ('/favicon.ico', '/examples/static/favicon.ico'),
    ('/robots.txt', '/examples/static/robots.txt'),
    # do other stuff
    ((r'.*http://otherdomain\.com.* (?P<any>.*)', r'/app/ctr\g<any>')),
    # remove the BASE prefix
    (BASE + '/$anything', '/$anything'),
)

# routes_out, like routes_in translates URL paths created with the web2py 
URL()
# function in the same manner that route_in translates inbound URL paths.
#

routes_out = (('/(?P<a>.*)','/web2py/\g<a>'),
    # do not reroute admin unless you want to disable it
    ('/admin/$anything', BASE + '/admin/$anything'),
    # do not reroute appadmin unless you want to disable it
    ('/$app/appadmin/$anything', BASE + '/$app/appadmin/$anything'),
    # do not reroute static files
    ('/$app/static/$anything', BASE + '/$app/static/$anything'),
    # do other stuff
    (r'.*http://otherdomain\.com.* /app/ctr(?P<any>.*)', r'\g<any>'),
    (r'/app(?P<any>.*)', r'\g<any>'),
    # restore the BASE prefix
    ('/$anything', BASE + '/$anything'),
)

my access.py for the admin is at the latest default for the git pull.

Advice, please?


On Thursday, August 30, 2012 8:04:50 AM UTC-4, Larry Wapnitsky wrote:
>
> I'm receiving the following message when logging in to the admin interface 
> of web2py on my hostmonster account:
>
> Login requires a secure (HTTPS) connection or running on localhost.
>
> I've followed the instructions here:  
> http://www.web2pyslices.com/slice/show/1401/web2py-on-shared-hosting-hostmonster-with-fastcgi
>
> It appears that this:
>
> if request.env.http_x_forwarded_for \
>         or request.env.wsgi_url_scheme in ['https', 'HTTPS'] \
>         or request.env.https == 'on':
>     session.secure()
> elif not remote_addr in hosts:
>     raise HTTP(200, T('Admin is disabled because insecure channel'))
>
>
>
> has been changed to this:
>
> if request.env.http_x_forwarded_for or request.is_https:
>     session.secure()
> elif not request.is_local and not DEMO_MODE:
>     raise HTTP(200, T('Admin is disabled because insecure channel'))
>
>
> but commenting it out still does not help.
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to