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
+12.3k Golang : How to check if a string starts or ends with certain characters or words?
+15.3k Golang : Delete certain files in a directory
+28.5k Golang : Change a file last modified date and time
+13.9k Golang : convert(cast) string to float value
+10.6k Golang : Simple File Server
+18.8k Golang : Implement getters and setters
+10.4k Golang : Simple Jawi(Yawi) to Rumi(Latin/Romanize) converter
+7.8k Golang : Load DSA public key from file example
+7.6k Javascript : Push notifications to browser with Push.js
+10.2k Golang : How to profile or log time spend on execution?
+6.6k Golang : How to validate ISBN?
+20.3k Golang : Determine if directory is empty with os.File.Readdir() function