With GAE deployed apps... The best solution I've found is using an error handler and a redirection to the static file with the letsencrypt response. Something like this:
In routes.py: routes_onerror = [ ('myapp/*', '/myapp/default/error_handler') ] In the error_handler controller: def error_handler(): ... requested_uri = request.vars.requested_uri if str(requested_uri)[:28] == "/.well-known/acme-challenge/" : redirect("http://mysite/filewithaccesstoletsencrypt.txt") ... El lunes, 7 de diciembre de 2015, 10:24:48 (UTC+1), Jacinto Parga escribió: > > Hi, > > I want to use letsencrypt ssl certificates ( https://letsencrypt.org/ ) > in a web2py application deployed on GAE. > > There is a good explanation about how to get it: > http://blog.seafuj.com/lets-encrypt-on-google-app-engine > > But I don't know how to deploy a view like : http:// > www.example.com/.well-known/acme-challenge/[challenge] > <http://www.example.com/.well-known/acme-challenge/%5Bchallenge%5D> > > I have given all steps, I have created the certificates and the keys. The > only thing I need is to create a view to let letsencrypt to confirm the > proper response. > > In other words, I need to make this code work on web2py: > class LetsEncryptHandler(RequestHandler): > > def get(self, challenge): > self.response.headers['Content-Type'] = 'text/plain' > responses = { > '[challenge 1]': '[response 1]' > '[challenge 2]': '[response 2]' > } > self.response.write(responses.get(challenge, '')) > > application = WSGIApplication([ > ('/.well-known/acme-challenge/([\w-]+)', LetsEncryptHandler), > ])... > > Any idea? > -- 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/d/optout.