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
+8.1k Golang : Convert word to its plural form example
+46k Golang : Encode image to base64 example
+30.5k Golang : Download file example
+24.7k Golang : Generate MD5 checksum of a file
+10.8k Golang : Create S3 bucket with official aws-sdk-go package
+36.1k Golang : Convert(cast) int64 to string
+44.4k Golang : Use wildcard patterns with filepath.Glob() example
+13k Golang : Date and Time formatting
+25.7k Mac/Linux and Golang : Fix bind: address already in use error
+23.7k Golang : Find biggest/largest number in array
+12.1k Golang : Extract part of string with regular expression
+21.3k SSL : How to check if current certificate is sha1 or sha2