Feb 08 2019

Let’s Encrypt di Sentora

Published by under LinuX

Langkah Langkah mendapatkan certifikat SSL dari Let’s Encrypt

apt-get install git
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
cd /opt/letsencrypt/
service apache2 stop
./letsencrypt-auto certonly –standalone d contoh.com
service apache2 start

Changing Sentora port:
On Sentora Panel go to Admin -> Module Admin -> Apache Config > Override a Virtualhost [Select VHost] ->
Tick Port Override.
Forward Port 80 to Overriden Port: 443
Custom Entry:
(Don’t forget to replace domain.com with your domain’s URL below:)
SSLEngine on
SSLProtocol ALL -SSLv2 -SSLv3
SSLHonorCipherOrder On
SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
SSLCertificateFile /etc/letsencrypt/live/domain.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/domain.com/chain.pem
# Keeping bellow for future upgrades.
# Requires Apache >= 2.4
SSLCompression off
Save Vhost.

curl -L -o /usr/local/sbin/le-renew http://do.co/le-renew
chmod +x /usr/local/sbin/le-renew
le-renew contoh.com
nano /etc/crontab
0 4 * * 1 /usr/local/sbin/le-renew contoh.com >> /var/log/le-renew.log
php -q /etc/sentora/panel/bin/daemon.php
service httpd restart

kalo ada masalah ketika mau cari letsencrip seeprti ini

Installing Python packages…
/opt/eff.org/certbot/venv/bin/python: No module named pip.__main__; ‘pip’ is a p ackage and cannot be directly executed
Traceback (most recent call last):
File “/tmp/tmp.d0gXaMVLJb/pipstrap.py”, line 177, in <module>
sys.exit(main())
File “/tmp/tmp.d0gXaMVLJb/pipstrap.py”, line 149, in main
pip_version = StrictVersion(check_output([python, ‘-m’, ‘pip’, ‘–version’])
File “/usr/lib/python2.7/subprocess.py”, line 544, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command ‘[‘/opt/eff.org/certbot/venv/bin/python’, ‘-m’, ‘pip’, ‘–version’]’ returned non-zero exit status 1

caranya mudah tinggal edit di letsencrypt-auto

cd /opt/letsencrypt

nano letsencrypt-auto

ganti seperti dibawah ini

pip_version = StrictVersion(check_output([python, '-m', 'pip', '--version'])
dengan
pip_version = StrictVersion(check_output(['pip', '--version'])

and
command = [python, '-m', 'pip', 'install', '--no-index', '--no-deps', '-U']
dengan
command = ['pip', 'install', '--no-index', '--no-deps', '-U']

kemudian jalankan

./letsencrypt-auto certonly –no-self-upgrade — standalone -d contoh.com

ingat ketika menjalankan letsencrypt apache service dimatikan dulu biar berhasil

kalo diatas masih belum bisa bisa menggunakan langkah ini

1.rm ./certbot-auto*

wget https://raw.githubusercontent.com/certbot/certbot/75499277be6699fd5a9b884837546391950a3ec9/certbot-auto

2.ganti seperti dibawah ini

pip_version = StrictVersion(check_output([python, '-m', 'pip', '--version'])
dengan
pip_version = StrictVersion(check_output(['pip', '--version'])

and
command = [python, '-m', 'pip', 'install', '--no-index', '--no-deps', '-U']
dengan
command = ['pip', 'install', '--no-index', '--no-deps', '-U']

3. kemudian jalankan ini

chmod +x ./certbot-auto ./certbot-auto –no-self-upgrade

terimakasih semoga bermanfaat

sumber https://community.letsencrypt.org/t/pip-error-with-certbot-auto/88200/5

Comments Off on Let’s Encrypt di Sentora