2015-11-09 02:13:08 +01:00
|
|
|
ISPConfig Let's Encrypt
|
|
|
|
=========================
|
|
|
|
|
|
|
|
|
2015-11-26 02:12:51 +01:00
|
|
|
# REQUIREMENTS
|
2015-11-09 02:13:08 +01:00
|
|
|
|
|
|
|
Let's Encrypt installed
|
|
|
|
|
2015-11-26 02:12:51 +01:00
|
|
|
ISPConfig (select version in branche)
|
2015-11-09 02:13:08 +01:00
|
|
|
|
|
|
|
Apache or Nginx
|
|
|
|
|
|
|
|
|
|
|
|
# INSTALLATION (as root)
|
|
|
|
|
|
|
|
```
|
|
|
|
git clone https://github.com/alexalouit/ISPConfig-letsencrypt.git
|
|
|
|
cd ISPConfig-letsencrypt
|
|
|
|
php -q install.php
|
|
|
|
```
|
|
|
|
|
|
|
|
After install, a new checkbox will be available in editing website, just check it.
|
|
|
|
|
2015-12-04 09:47:54 +01:00
|
|
|
Adjust server in ```/etc/letsencrypt/cli.ini```if isn't ``https://acme-v01.api.letsencrypt.org/directory```
|
|
|
|
|
2015-11-09 02:13:08 +01:00
|
|
|
|
|
|
|
## MANUAL INSTALLATION
|
|
|
|
|
2015-12-01 17:57:44 +01:00
|
|
|
- make your own backup!
|
|
|
|
|
2015-11-26 02:12:51 +01:00
|
|
|
- go to dir
|
|
|
|
```
|
|
|
|
cd ISPConfig-letsencrypt
|
|
|
|
```
|
|
|
|
|
2015-12-04 09:47:54 +01:00
|
|
|
- create Let's Encrypt configuration
|
2015-11-09 02:13:08 +01:00
|
|
|
```
|
|
|
|
cp ./cli.ini /etc/letsencrypt/cli.ini
|
|
|
|
```
|
|
|
|
|
2015-11-26 02:12:51 +01:00
|
|
|
- patch ISPConfig (merge all files from ./src to /usr/local/ispconfig)
|
2015-11-09 02:13:08 +01:00
|
|
|
```
|
2015-11-26 02:12:51 +01:00
|
|
|
rsync -av ./src/ /usr/local/ispconfig/
|
2015-11-09 02:13:08 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
- prepare apache
|
|
|
|
```
|
|
|
|
cp ./apache.letsencrypt.conf /etc/apache2/conf-available/letsencrypt.conf
|
|
|
|
a2enmod headers
|
|
|
|
a2enconf letsencrypt
|
|
|
|
service apache2 reload
|
|
|
|
```
|
|
|
|
|
|
|
|
- prepare nginx
|
|
|
|
```
|
|
|
|
patch /etc/nginx/nginx.conf < ./nginx.conf.patch
|
|
|
|
service nginx reload
|
|
|
|
```
|
|
|
|
|
|
|
|
- create a cron for automatic renewal:
|
|
|
|
```
|
|
|
|
crontab -e
|
|
|
|
30 02 * * * /root/.local/share/letsencrypt/bin/letsencrypt-renewer >> /var/log/ispconfig/cron.log; done
|
|
|
|
```
|
|
|
|
|
|
|
|
- sql queries:
|
|
|
|
```
|
|
|
|
ALTER TABLE `web_domain` ADD `ssl_letsencrypt` enum('n','y') NOT NULL DEFAULT 'n';
|
2015-11-26 02:12:51 +01:00
|
|
|
```
|
2016-01-20 17:13:56 +01:00
|
|
|
|
|
|
|
|
|
|
|
## TROUBLESHOOTING
|
|
|
|
|
|
|
|
update Let's Encrypt
|
|
|
|
```
|
|
|
|
cd /root/letsencrypt
|
|
|
|
git fetch
|
|
|
|
./letsencrypt-auto
|
|
|
|
```
|
|
|
|
|
|
|
|
see Let's Encrypt log
|
|
|
|
```
|
|
|
|
cat /var/log/letsencrypt/letsencrypt.log
|
|
|
|
```
|
|
|
|
|
|
|
|
see ISPConfig log
|
|
|
|
```
|
|
|
|
cat /var/log/ispconfig/ispconfig.log
|
|
|
|
cat /var/log/ispconfig/cron.log
|
|
|
|
```
|
|
|
|
|
|
|
|
remove certs
|
|
|
|
```
|
|
|
|
rm -r /etc/letsencrypt/archive/$domain/
|
|
|
|
rm -r /etc/letsencrypt/live/$domain/
|
|
|
|
rm -r /etc/letsencrypt/renewal/$domain.conf
|
|
|
|
```
|
|
|
|
|
|
|
|
re-generate cert: uncheck SSL & Let's Encrypt, save, recheck and save
|