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.3k Golang : Play .WAV file from command line
+9.9k Golang : Fix go.exe is not compatible with the version of Windows you're running
+9.2k Golang : Find and replace data in all files recursively
+9.7k Swift : Convert (cast) String to Integer
+6.5k Golang : Check to see if *File is a file or directory
+18.9k Golang : How to get time from unix nano example
+15.3k Golang : Get IP addresses of a domain name
+8.2k Golang : Inject/embed Javascript before sending out to browser example
+18k Golang : When to use public and private identifier(variable) and how to make the identifier public or private?
+8.7k Golang : Get all countries currencies code in JSON format
+23.6k Golang : Daemonizing a simple web server process example
+9.9k Golang : Command line file upload program to server example