Hey Folks,
I’m sure many of you like me have wondered how to simplify the deployment of Let’s Encrypt certificates in Webmin, without having to install a web server to deal with the validation process.
*** The below instructions assume you have a domain resolvable to your server, as without this you won’t be able to issue a certificate. ***
Recently, I was messing around with PHP, and discovered that PHP has a “simple” web server built into it’s core. It requires PHP 5.4 or higher, but this should be too much to ask for since it’s been readily available for most distros for quite some time.
Here’s how to make use of PHP’s web server functionality to deploy a Let’s Encrypt certificate.
-
From the command line (via SSH) create a directory somewhere in your filesystem.
-
Navigate to your newly create folder, then issue the command
php -S 123.123.123.123:80
*** replace “123.123.123.123” with the public IP address resolving to your server ***
-
Navigate inside Webmin to
Webmin > Webmin Configuration > SSL Encryption > Let’s Encrypt
-
Click on
Request Certificate
Within a few about a minute, Let’s encrypt will generate the certificate and spit back a success message. Now you can safely terminate the PHP web server by pressing Ctrl+C
in your command line session.
Refresh your Webmin session in the browser, and tada! You now have an SSL enable session powered by Let’s Encrypt!
*** To renew the certificate, you’ll likely have to go through the same steps above, however this is still far easier than having to setup a web server like Apache just to get a certificate issued. ***
If you have questions, or feedback, feel free to post a reply to this thread.
Best Regards,
Peter Knowles
TPN Solutions
Email: pknowles@tpnsolutions.com