This is a fairly common question, and there isn't a One True Answer.
These are the most common techniques:
<?php | |
$remoteFile = file_get_contents('ssh2.sftp://user:[email protected]:22/path/to/file'); | |
// See http://php.net/manual/en/wrappers.ssh2.php for more informations. |
^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(([Zz])|([\+|\-]([01][0-9]|2[0-3]):[0-5][0-9]))$ |
Prerequisites : the letsencrypt CLI tool
This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.
You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge
.
Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.
I redirect all HTTP requests on HTTPS, so my nginx config looks like :
server {
#!/usr/bin/env python3 | |
import asyncio | |
import iterm2 | |
THEME_LIGHT = "Tango Light" | |
THEME_DARK = "Tango Dark" | |
class AutoSwitchTheme: |