{"id":3050,"date":"2026-11-03T10:00:00","date_gmt":"2026-11-03T07:00:00","guid":{"rendered":"https:\/\/narhost.com\/destek\/?p=3050"},"modified":"2026-11-04T23:45:36","modified_gmt":"2026-11-04T20:45:36","slug":"certbot-nginx-ssl-kurulumu","status":"publish","type":"post","link":"https:\/\/narhost.com\/destek\/certbot-nginx-ssl-kurulumu\/","title":{"rendered":"Nginx&#8217;e Certbot ile SSL Nas\u0131l Kurulur (Ubuntu 24.04)"},"content":{"rendered":"<p class=\"kb-dogrulama\">Son g\u00f6zden ge\u00e7irme: Kas\u0131m 2026 \u00b7 Ubuntu 24.04 ve Certbot resm\u00ee kurulum talimatlar\u0131na (snap) g\u00f6re<\/p>\n<div id=\"hizli-cozum\" class=\"ai-box ai-box--cozum\">\n<p class=\"ai-box-title\">H\u0131zl\u0131 \u00e7\u00f6z\u00fcm<\/p>\n<p><strong>Certbot Nginx SSL kurulumu<\/strong>, Let&#8217;s Encrypt&#8217;ten \u00fccretsiz sertifika al\u0131p Nginx&#8217;in sunucu blo\u011funu HTTPS i\u00e7in otomatik d\u00fczenler. Alan ad\u0131n\u0131n A kayd\u0131 sunucuyu g\u00f6steriyor ve 80 numaral\u0131 port a\u00e7\u0131ksa:<\/p>\n<ol>\n<li><code>sudo snap install --classic certbot<\/code> ile Certbot&#8217;u kurun.<\/li>\n<li><code>sudo ln -s \/snap\/bin\/certbot \/usr\/local\/bin\/certbot<\/code> ile komutu yola ekleyin.<\/li>\n<li><code>sudo certbot --nginx -d ornek.com -d www.ornek.com<\/code> ile sertifikay\u0131 al\u0131p kurun.<\/li>\n<li><code>sudo certbot renew --dry-run<\/code> ile otomatik yenilemeyi test edin.<\/li>\n<\/ol>\n<\/div>\n<table class=\"kb-uyg\">\n<tr>\n<th>Panel<\/th>\n<td>SSH (komut sat\u0131r\u0131)<\/td>\n<\/tr>\n<tr>\n<th>Sistem<\/th>\n<td>Ubuntu 24.04 ve 22.04, Nginx<\/td>\n<\/tr>\n<tr>\n<th>Yetki<\/th>\n<td>root ya da sudo<\/td>\n<\/tr>\n<tr>\n<th>Narhost \u00fcr\u00fcn\u00fc<\/th>\n<td><a href=\"https:\/\/narhost.com\/vps-sunucu\" title=\"Narhost VPS Sunucu paketleri\">VPS Sunucu<\/a>, VDS Sunucu<\/td>\n<\/tr>\n<\/table>\n<div class=\"kb-once\">\n<p class=\"label\">Ba\u015flamadan \u00f6nce<\/p>\n<ul>\n<li>Alan ad\u0131n\u0131n ve <code>www<\/code> alt alan ad\u0131n\u0131n A kayd\u0131 sunucunuzun IP adresini g\u00f6stermeli; DNS yeni de\u011fi\u015ftiyse yay\u0131lmas\u0131n\u0131 bekleyin.<\/li>\n<li>Nginx kurulu ve sitenin <code>server_name<\/code> sat\u0131r\u0131 alan ad\u0131n\u0131z\u0131 i\u00e7eren bir sunucu blo\u011fu \u00e7al\u0131\u015f\u0131yor olmal\u0131.<\/li>\n<li>G\u00fcvenlik duvar\u0131nda 80 ve 443 numaral\u0131 portlar a\u00e7\u0131k olmal\u0131; do\u011frulama 80 \u00fczerinden yap\u0131l\u0131r.<\/li>\n<\/ul>\n<\/div>\n<h2>Certbot Nginx SSL kurulumu nas\u0131l \u00e7al\u0131\u015f\u0131r<\/h2>\n<p>Certbot, Let&#8217;s Encrypt&#8217;in otomatik sertifika sistemine ba\u011flanan istemcidir. <code>--nginx<\/code> eklentisiyle \u00e7al\u0131\u015ft\u0131\u011f\u0131nda \u00f6nce alan ad\u0131n\u0131n size ait oldu\u011funu, Let&#8217;s Encrypt&#8217;in sunucunuza 80 numaral\u0131 porttan yapt\u0131\u011f\u0131 bir istekle do\u011frular; ard\u0131ndan sertifikay\u0131 <code>\/etc\/letsencrypt\/live\/<\/code> alt\u0131na kaydeder ve ilgili sunucu blo\u011funa <code>listen 443 ssl<\/code> ile sertifika sat\u0131rlar\u0131n\u0131 ekler. \u0130sterseniz HTTP isteklerini HTTPS&#8217;e y\u00f6nlendiren blo\u011fu da kendisi yazar.<\/p>\n<p><a href=\"https:\/\/certbot.eff.org\/instructions?ws=nginx&amp;os=snap\" title=\"Certbot resm\u00ee talimatlar\u0131 \u2014 Nginx ve snap\" target=\"_blank\" rel=\"noopener\">Certbot&#8217;un resm\u00ee talimatlar\u0131<\/a> kurulum i\u00e7in snap paketini \u00f6nerir; snap s\u00fcr\u00fcm\u00fc g\u00fcncel kal\u0131r ve otomatik yenileme zamanlay\u0131c\u0131s\u0131yla birlikte gelir. Ubuntu 24.04 sunucu kurulumlar\u0131nda snapd varsay\u0131lan olarak bulunur.<\/p>\n<figure class=\"nh-sema\"><img src=\"https:\/\/narhost.com\/destek\/wp-content\/uploads\/2026\/11\/certbot-nginx-ssl-kurulumu-sema-narhost.webp\" alt=\"certbot nginx ssl kurulumu \u015femas\u0131 \u2014 snap kurulumu, server_name kontrol\u00fc, certbot --nginx ve yenileme testi\" width=\"1200\" height=\"500\" loading=\"lazy\" decoding=\"async\"><figcaption>Do\u011frulama 80 numaral\u0131 porttan yap\u0131l\u0131r; A kayd\u0131 ve port a\u00e7\u0131k olmal\u0131.<\/figcaption><\/figure>\n<h2>Ad\u0131m ad\u0131m kurulum<\/h2>\n<ol class=\"kb-adimlar\">\n<li><strong>G\u00fcvenlik duvar\u0131nda web portlar\u0131n\u0131 a\u00e7\u0131n.<\/strong> UFW kullan\u0131yorsan\u0131z Nginx profili iki portu birlikte a\u00e7ar.\n<pre><code class=\"language-bash\">sudo ufw allow 'Nginx Full'\nsudo ufw status<\/code><\/pre>\n<p class=\"kb-cikti\">Beklenen sonu\u00e7: listede <code>Nginx Full ALLOW<\/code> sat\u0131r\u0131 g\u00f6r\u00fcn\u00fcr.<\/p>\n<\/li>\n<li><strong>Varsa eski Certbot paketini kald\u0131r\u0131n, snap s\u00fcr\u00fcm\u00fcn\u00fc kurun.<\/strong> apt ile kurulmu\u015f bir Certbot snap s\u00fcr\u00fcm\u00fcyle \u00e7ak\u0131\u015f\u0131r.\n<pre><code class=\"language-bash\">sudo apt-get remove certbot\nsudo snap install --classic certbot\nsudo ln -s \/snap\/bin\/certbot \/usr\/local\/bin\/certbot<\/code><\/pre>\n<p class=\"kb-cikti\">Beklenen sonu\u00e7: <code>certbot --version<\/code> s\u00fcr\u00fcm numaras\u0131n\u0131 yazar.<\/p>\n<\/li>\n<li><strong>Sunucu blo\u011funun alan ad\u0131n\u0131 do\u011frulay\u0131n.<\/strong> Certbot, sertifikay\u0131 hangi blo\u011fa kuraca\u011f\u0131n\u0131 <code>server_name<\/code> sat\u0131r\u0131ndan bulur.\n<pre><code class=\"language-bash\">sudo grep -R \"server_name\" \/etc\/nginx\/sites-enabled\/\nsudo nginx -t<\/code><\/pre>\n<p class=\"kb-cikti\">Beklenen sonu\u00e7: <code>server_name ornek.com www.ornek.com;<\/code> sat\u0131r\u0131 ve <code>syntax is ok<\/code>, <code>test is successful<\/code> iletileri.<\/p>\n<\/li>\n<li><strong>Sertifikay\u0131 al\u0131n ve Nginx&#8217;e kurun.<\/strong>\n<pre><code class=\"language-bash\">sudo certbot --nginx -d ornek.com -d www.ornek.com<\/code><\/pre>\n<p class=\"kb-cikti\">\u0130lk \u00e7al\u0131\u015ft\u0131rmada e-posta adresi sorulur ve kullan\u0131m ko\u015fullar\u0131n\u0131 onaylaman\u0131z istenir. Sonunda <code>Successfully deployed certificate<\/code> iletisi ve sertifikan\u0131n kaydedildi\u011fi yol g\u00f6r\u00fcn\u00fcr.<\/p>\n<\/li>\n<li><strong>Otomatik yenilemeyi test edin.<\/strong>\n<pre><code class=\"language-bash\">sudo certbot renew --dry-run\nsystemctl list-timers | grep certbot<\/code><\/pre>\n<p class=\"kb-cikti\">Beklenen sonu\u00e7: deneme yenilemesi ba\u015far\u0131l\u0131 biter ve listede <code>snap.certbot.renew.timer<\/code> zamanlay\u0131c\u0131s\u0131 g\u00f6r\u00fcn\u00fcr.<\/p>\n<\/li>\n<\/ol>\n<div class=\"warn-box\">\n<p class=\"label\">Dikkat<\/p>\n<p>Do\u011frulama birka\u00e7 kez \u00fcst \u00fcste ba\u015far\u0131s\u0131z olursa Let&#8217;s Encrypt sizi bir s\u00fcre s\u0131n\u0131rlar. Ger\u00e7ek komutu tekrar tekrar denemeden \u00f6nce A kayd\u0131n\u0131 ve 80 portunu kontrol edin; denemeleri <code>--dry-run<\/code> ile yap\u0131n.<\/p>\n<\/div>\n<h2>Yaln\u0131z sertifika almak isterseniz<\/h2>\n<p>Nginx yap\u0131land\u0131rman\u0131z\u0131 kendiniz y\u00f6netiyorsan\u0131z Certbot&#8217;un dosyalara dokunmas\u0131n\u0131 istemeyebilirsiniz. Bu durumda <code>sudo certbot certonly --nginx -d ornek.com<\/code> sertifikay\u0131 al\u0131r ama sunucu blo\u011funu de\u011fi\u015ftirmez; <code>ssl_certificate<\/code> ve <code>ssl_certificate_key<\/code> sat\u0131rlar\u0131n\u0131 <code>\/etc\/letsencrypt\/live\/ornek.com\/<\/code> alt\u0131ndaki <code>fullchain.pem<\/code> ve <code>privkey.pem<\/code> dosyalar\u0131na siz ba\u011flars\u0131n\u0131z. Yenilemeden sonra Nginx&#8217;in yeni sertifikay\u0131 okumas\u0131 i\u00e7in yeniden y\u00fcklenmesi gerekir.<\/p>\n<h2>Do\u011frulama<\/h2>\n<div class=\"success-box\">\n<p class=\"label\">Sonu\u00e7<\/p>\n<p>Taray\u0131c\u0131da <code>https:\/\/ornek.com<\/code> adresi kilit simgesiyle a\u00e7\u0131l\u0131yor, <code>http:\/\/<\/code> adresi HTTPS&#8217;e y\u00f6nleniyor ve <code>certbot renew --dry-run<\/code> hatas\u0131z bitiyorsa Certbot Nginx SSL kurulumu tamamd\u0131r. Sertifika ayr\u0131nt\u0131lar\u0131n\u0131 <code>sudo certbot certificates<\/code> ile g\u00f6rebilirsiniz.<\/p>\n<\/div>\n<h2>H\u00e2l\u00e2 \u00e7\u00f6z\u00fclmediyse<\/h2>\n<ul>\n<li><strong>Do\u011frulama &#8220;Timeout during connect&#8221; ile bitiyor.<\/strong> 80 numaral\u0131 port kapal\u0131d\u0131r ya da A kayd\u0131 ba\u015fka bir sunucuyu g\u00f6sterir. Kayd\u0131 <a href=\"https:\/\/narhost.com\/destek\/a-kaydi-nasil-eklenir\/\" title=\"A Kayd\u0131 Nas\u0131l Eklenir \u2014 Narhost Destek Merkezi\">A kayd\u0131 nas\u0131l eklenir<\/a> kart\u0131na g\u00f6re d\u00fczeltin.<\/li>\n<li><strong>&#8220;Could not automatically find a matching server block&#8221; hatas\u0131.<\/strong><code>server_name<\/code> sat\u0131r\u0131 alan ad\u0131n\u0131 i\u00e7ermiyor; kurulum ayr\u0131nt\u0131lar\u0131 <a href=\"https:\/\/narhost.com\/destek\/nginx-kurulumu\/\" title=\"Nginx Web Sunucusu Kurulumu \u2014 Narhost Destek Merkezi\">Nginx web sunucusu kurulumu<\/a> kart\u0131nda.<\/li>\n<li><strong>Taray\u0131c\u0131 protokol hatas\u0131 veriyor.<\/strong> 443 portunda bozuk bir blok kalm\u0131\u015f olabilir; <a href=\"https:\/\/narhost.com\/destek\/err-ssl-protocol-error-hatasi\/\" title=\"ERR_SSL_PROTOCOL_ERROR Hatas\u0131 \u2014 Narhost Destek Merkezi\">ERR_SSL_PROTOCOL_ERROR<\/a> kart\u0131ndaki ad\u0131mlara bak\u0131n.<\/li>\n<li><strong>Yenilemeden sonra eski sertifika g\u00f6r\u00fcn\u00fcyor.<\/strong> Nginx yeniden y\u00fcklenmemi\u015ftir; <a href=\"https:\/\/narhost.com\/destek\/nginx-nasil-yeniden-baslatilir\/\" title=\"Nginx Nas\u0131l Yeniden Ba\u015flat\u0131l\u0131r \u2014 Narhost Destek Merkezi\">Nginx nas\u0131l yeniden ba\u015flat\u0131l\u0131r<\/a> kart\u0131ndaki <code>reload<\/code> komutunu \u00e7al\u0131\u015ft\u0131r\u0131n.<\/li>\n<\/ul>\n<div class=\"cta-box\">\n<p class=\"label\">Narhost deste\u011fi<\/p>\n<p>VPS ve VDS sunucular y\u00f6netimsizdir; sertifika ve web sunucusu ayarlar\u0131 sizin sorumlulu\u011funuzdad\u0131r. Sunucuya a\u011f eri\u015fiminde bir sorun g\u00f6r\u00fcyorsan\u0131z talebe alan ad\u0131n\u0131, sunucu IP adresini ve Certbot&#8217;un hata \u00e7\u0131kt\u0131s\u0131n\u0131 ekleyin.<\/p>\n<p><a class=\"cta-btn\" href=\"https:\/\/narhost.com\/submitticket.php\">Destek talebi a\u00e7<\/a><\/div>\n<div class=\"kb-ilgili\">\n<p class=\"label\">Sonraki ad\u0131mlar<\/p>\n<ul>\n<li><a href=\"https:\/\/narhost.com\/destek\/vps-vds-ilk-kurulum-rehberi\/\" title=\"VPS VDS Sunucu \u0130lk Kurulum Rehberi - Narhost Destek\">VPS VDS Sunucu \u0130lk Kurulum Rehberi (konu merkezi)<\/a><\/li>\n<li><a href=\"https:\/\/narhost.com\/destek\/ufw-guvenlik-duvari-kurulumu\/\" title=\"UFW G\u00fcvenlik Duvar\u0131 Kurulumu \u2014 Narhost Destek Merkezi\">UFW g\u00fcvenlik duvar\u0131 kurulumu ve kural y\u00f6netimi<\/a><\/li>\n<li><a href=\"https:\/\/narhost.com\/destek\/caa-kaydi-nasil-eklenir\/\" title=\"CAA Kayd\u0131 Nas\u0131l Eklenir \u2014 Narhost Destek Merkezi\">CAA kayd\u0131 nas\u0131l eklenir<\/a><\/li>\n<li><a href=\"https:\/\/narhost.com\/blog\/ssl-sertifika-suresi\/\" title=\"SSL Sertifika S\u00fcresi K\u0131sal\u0131yor \u2014 Narhost Blog\">SSL sertifika s\u00fcresi k\u0131sal\u0131yor, 2029&#8217;a kadar takvim<\/a><\/li>\n<\/ul>\n<\/div>\n<div class=\"kb-faq\">\n<h2>S\u0131k\u00e7a sorulan sorular<\/h2>\n<h3>Certbot sertifikas\u0131 ne kadar ge\u00e7erli, elle yenilemem gerekir mi?<\/h3>\n<p>Let&#8217;s Encrypt sertifikalar\u0131 k\u0131sa \u00f6m\u00fcrl\u00fcd\u00fcr ve Certbot onlar\u0131 s\u00fcre dolmadan otomatik yeniler. Snap paketiyle gelen zamanlay\u0131c\u0131 bu i\u015fi yapar; yap\u0131land\u0131rmay\u0131 de\u011fi\u015ftirmedi\u011finiz s\u00fcrece Certbot&#8217;u yeniden \u00e7al\u0131\u015ft\u0131rman\u0131z gerekmez. <code>renew --dry-run<\/code> testinin ge\u00e7ti\u011finden emin olman\u0131z yeterlidir.<\/p>\n<h3>Certbot ile wildcard sertifika al\u0131nabilir mi?<\/h3>\n<p>Al\u0131nabilir, ama joker sertifika yaln\u0131z DNS do\u011frulamas\u0131yla verilir; <code>--nginx<\/code> eklentisinin kulland\u0131\u011f\u0131 HTTP do\u011frulamas\u0131 bunu kar\u015f\u0131lamaz. Alan ad\u0131n\u0131za bir TXT kayd\u0131 eklemeniz ya da DNS sa\u011flay\u0131c\u0131n\u0131z i\u00e7in bir Certbot eklentisi kullanman\u0131z gerekir.<\/p>\n<h3>apt ile kurulan Certbot mu snap mi kullan\u0131lmal\u0131?<\/h3>\n<p>Certbot&#8217;un resm\u00ee talimatlar\u0131 snap s\u00fcr\u00fcm\u00fcn\u00fc \u00f6nerir; g\u00fcncellemeleri do\u011frudan Certbot ekibinden gelir. apt paketi de \u00e7al\u0131\u015f\u0131r, ama ikisi ayn\u0131 anda kurulu olmamal\u0131d\u0131r. Snap s\u00fcr\u00fcm\u00fcne ge\u00e7erken \u00f6nce apt paketini kald\u0131r\u0131n.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu 24.04&#8217;te Nginx i\u00e7in Let&#8217;s Encrypt sertifikas\u0131: snap ile Certbot kurulumu, certbot &#8211;nginx ile otomatik yap\u0131land\u0131rma, certonly se\u00e7ene\u011fi, snap.certbot.renew.timer ile otomatik yenileme ve do\u011frulama hatalar\u0131.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,13],"tags":[169,319],"class_list":["post-3050","post","type-post","status-publish","format-standard","hentry","category-vds-server","category-vps-server","tag-nginx","tag-certbot"],"meta_box":[],"_links":{"self":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts\/3050","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/comments?post=3050"}],"version-history":[{"count":1,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts\/3050\/revisions"}],"predecessor-version":[{"id":3117,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts\/3050\/revisions\/3117"}],"wp:attachment":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/media?parent=3050"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/categories?post=3050"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/tags?post=3050"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}