Instalace CertBota

Message
Autor
Uživatelský avatar
deadswim
Příspěvky: 22
Věk: 21
Registrován: 14 srp 2017, 17:40
Reputation: 0
Kontaktovat uživatele:

Instalace CertBota

#1 Příspěvekod deadswim » 06 kvě 2021, 11:26

Ahojky, poslední dobou vídám, že hodně lidí využívá FH VPS jako takový webhosting, dosti často se stává, že ani majitelé těchto VPS neví, že existuje něco jako Certbot, který vám udělá SSL certifikaci na web.
Zde vám teda předvedu jednoduchou instalaci Certbota, která zabere cirka 2-3 minutky.

!!!! VAROVÁNÍ !!!!
Než-li začnete instalaci, musím vás upozornit, že toto je návod na starší verze Debianu/Ubuntu, pro novější verze systémů prosím upravte si balíčky, které vám vyhodí Console jako odpověď.

1) V první řadě musíme instalovat potřebné balíčky na VPS

Kód: Vybrat vše

apt-get install software-properties-common python-software-properties
po nainstalování balíčků napíšeme další příkaz

Kód: Vybrat vše

add-apt-repository ppa:certbot/certbot
updatneme balíčky (apt-get update) a nainstalujeme rozšíření certbota na apache2

Kód: Vybrat vše

apt-get install python-certbot-apache


2 Teď se podíváme na samotnou instalaci Let's Encrypt SSL Certificate, zvoláme jednoduchý příkaz do Terminálu

Kód: Vybrat vše

certbot --apache -d vaše_domena.eu
.
Po zvolání příkazu, nám script bude říkat kde nalezneme podmínky, jestli s nimi souhlasíme.
Názorná ukázka:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): admin@vaše_domena.eu

-------------------------------------------------------------------------------
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA ... 5-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v01.api.letsencrypt.org/directory
-------------------------------------------------------------------------------
(A)gree/(C)ancel: A

-------------------------------------------------------------------------------
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about EFF and
our work to encrypt the web, protect its users and defend digital rights.
-------------------------------------------------------------------------------
(Y)es/(N)o: Y

Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for yourdomian.com
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/000-default-le-ssl.conf
Deploying Certificate for yourdomain.com to VirtualHost /etc/apache2/sites-available/000-default-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/000-default-le-ssl.conf

3) Pokud-li máme dokončený bod číslo 2. tak se vrhneme na Redirect z Http na Https, po dokončení a odsouhlasení podmínek se nás script bude ptát právě na to, jestli chceme Redirect z Http automaticky na Https, takže zvolíme dvojku.
Názorná ukázka
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
-------------------------------------------------------------------------------
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Redirecting vhost in /etc/apache2/sites-enabled/000-default.conf to ssl vhost in /etc/apache2/sites-available/000-default-le-ssl.conf

-------------------------------------------------------------------------------
Congratulations! You have successfully enabled https://vaše_domena.eu


Tak a máme nainstalovaného Certbota, snad se vám návod líbil a budu rád za pozitivní karmu. :)
MADGAMES.EU, PŮSOBÍ NA CS:GO SCÉNĚ OD ROKU 2019, SNAŽÍME SE VYPLNIT VÁŠ VOLNÝ ČAS, TAK ABY JSTE SE NENUDILI!
IČO - 09846905 - VOP

Zpět na „Návody“

Kdo je online

Uživatelé prohlížející si toto fórum: Žádní registrovaní uživatelé a 4 hosti