to verify ssl certificate, need upload hidden folder ("/.well-known" containing files application.
i deploying java application eclipse, these files not receive @ application on appengine. guess filtered out.
i tried add hidden folder static file appengine-web.xml, did not help.
<!-- configure serving/caching of gwt files --> <static-files> <include path="**" /> <include path=".**" /> <include path="**.*" expiration="0s" /> <include path="**.well-known" expiration="0s" /> <include path="**.nocache.*" expiration="0s" /> <include path="**.cache.*" expiration="365d" /> <include path="**.css" expiration="30d"/> <exclude path="**.gwt.rpc" /> <exclude path="**.html" /> </static-files>
any ideas how upload these folder , files?
for else coming here me after trying serve challenge letsencrypt in static manner in google app engine , failing, following did me: (one might able statically, didn't try didn't want spend more time trying out stuff , ian apparently tried , not make work [maybe copy command done internally on google app engine ignores directories start dot] )
taken http://igorartamonov.com/2015/12/lets-encrypt-ssl-google-appengine/ credits go igor artamonov.
just build servlet like:
public class letsencryptservlet extends httpservlet {
public static final map<string, string> challenges = new hashmap<string, string>(); static { challenges.put("rzrvz9gd7eh3i_tsjm-b0vdemsld4oo_lwsaggskp6c", "rzrvz9gd7eh3i_tsjm-b0vdemsld4oo_lwsaggskp6c.onrza3uelibswex270ntuirzkpfxw096nenwbmgw0-e"); } @override protected void doget(httpservletrequest req, httpservletresponse resp) throws servletexception, ioexception { if (!req.getrequesturi().startswith("/.well-known/acme-challenge/")) { resp.senderror(404); return; } string id = req.getrequesturi().substring("/.well-known/acme-challenge/".length()); if (!challenges.containskey(id)) { resp.senderror(404); return; } resp.setcontenttype("text/plain"); resp.getoutputstream().print(challenges.get(id)); } }
and add web.xml
somethine like:
<servlet> <servlet-name>letsencrypt</servlet-name> <servlet-class>...letsencryptservlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>letsencrypt</servlet-name> <url-pattern>/.well-known/acme-challenge/*</url-pattern> </servlet-mapping>
of course, sure servlet class has full classpath created servlet.
that blog post deals other steps necessary generate , install certificate.
ian: sure deploying servlet well? check logs, make sure testing right version.. maybe had compilation issue..
cheers
Comments
Post a Comment