Golang : Getting Echo framework StartAutoTLS to work
Problem:
You want to try out the Echo framework for Golang and somehow cannot get the AutoTLS recipe to work. What's going on and how to get it to work?
Solution:
In order to get the recipe to work. You need an actual domain name. Yes, you will need to buy one or setup a sub-domain.
localhost
or IP address pointing to your web server will not work.
Hence in the documentation:
This recipe demonstrates how to obtain TLS certificates for a domain automatically from Let’s Encrypt. Echo#StartAutoTLS accepts an address which should listen on port 443.
Browse to
https://<DOMAIN>
. If everything goes fine, you should see a welcome message with TLS enabled on the website.
Yup. Focus on the <DOMAIN>
keyword.
Hope this helps!
References:
See also : Golang : Gin framework accept query string by post request example
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+17.2k Golang : Fix cannot convert buffer (type *bytes.Buffer) to type string error
+11.3k Golang : Fix - does not implement sort.Interface (missing Len method)
+12.9k Golang : Listen and Serve on sub domain example
+8.9k Golang : HTTP Routing with Goji example
+13.5k Golang : Verify token from Google Authenticator App
+10.5k Golang : cannot assign type int to value (type uint8) in range error
+10.4k Golang : Convert file content to Hex
+8.3k Golang : Get final or effective URL with Request.URL example
+9.7k Golang : Eroding and dilating image with OpenCV example
+8.9k Golang : Accept any number of function arguments with three dots(...)
+4.5k Java : Generate multiplication table example
+14.4k Golang : Simple word wrap or line breaking example