{"id":1128,"date":"2022-09-15T07:36:06","date_gmt":"2022-09-15T07:36:06","guid":{"rendered":"https:\/\/sunucucozumleri.com\/?p=1128"},"modified":"2024-01-18T10:42:19","modified_gmt":"2024-01-18T07:42:19","slug":"sunucuda-yuklu-php-versiyonunu-gizleme","status":"publish","type":"post","link":"https:\/\/sunucucozumleri.com\/blog\/sunucuda-yuklu-php-versiyonunu-gizleme\/","title":{"rendered":"Sunucuda Y\u00fckl\u00fc PHP Versiyonunu Gizleme"},"content":{"rendered":"<p><span class=\"_5yl5\">Merhabalar,<\/span><\/p>\n<p>G\u00fcvenlik sebebiyle, sald\u0131r\u0131lardan kendinizi koruman\u0131z i\u00e7in sunucunuzun zay\u0131fl\u0131klar\u0131n\u0131 \u00f6\u011frenmek isteyen sald\u0131rganlardan bazen PHP versiyonunuzu gizlemeniz gerekebilir.<\/p>\n<p>E\u011fer kulland\u0131\u011f\u0131n\u0131z\u00a0<strong>PHP versiyonu<\/strong>nda bilinen g\u00fcvenlik zaafiyeti varsa, bu durum sald\u0131rganlar\u0131n i\u015fini fazlas\u0131yla kolayla\u015ft\u0131racakt\u0131r.<\/p>\n<p>Php versiyonunu gizlemek i\u00e7in PHP yap\u0131land\u0131rma dosyas\u0131n\u0131 d\u00fczenlemeniz gerekir.<br \/>\nBu yap\u0131land\u0131rma dosyas\u0131n\u0131n sunucunuzdaki yerini bilmiyorsan\u0131z, onu bulmak i\u00e7in a\u015fa\u011f\u0131daki komutu \u00e7al\u0131\u015ft\u0131r\u0131n:<\/p>\n<pre>$ php -i | grep \"Loaded Configuration File\"<\/pre>\n<p><strong>&#8212;&#8212;&#8212;&#8212;&#8212;- On CentOS\/RHEL\/Fedora &#8212;&#8212;&#8212;&#8212;&#8212;-\u00a0<\/strong>Konfigrasyon Dosyas\u0131n\u0131n Konumu<br \/>\n\/etc\/php.ini<br \/>\n<strong>&#8212;&#8212;&#8212;&#8212;&#8212;- On Debian\/Ubuntu\/Linux Mint &#8212;&#8212;&#8212;&#8212;&#8212;-\u00a0<\/strong>Konfigrasyon Dosyas\u0131n\u0131n Konumu =<\/p>\n<pre>\/etc\/php\/7.0\/cli\/php.ini<\/pre>\n<p>Herhangi bir de\u011fi\u015fiklik yapmadan \u00f6nce PHP config dosyan\u0131z\u0131 yedeklemenizi \u00f6neririz.<\/p>\n<p><strong>&#8212;&#8212;&#8212;&#8212;&#8212;- CentOS\/RHEL\/Fedora &#8212;&#8212;&#8212;&#8212;&#8212;-<\/strong><\/p>\n<pre>cp \/etc\/php.ini \/etc\/php.ini.orig<\/pre>\n<p><strong>&#8212;&#8212;&#8212;&#8212;&#8212;- Debian\/Ubuntu\/Linux Mint &#8212;&#8212;&#8212;&#8212;&#8212;-<\/strong><\/p>\n<pre>cp \/etc\/php\/7.0\/cli\/php.ini \/etc\/php\/7.0\/cli\/php.ini.orig<\/pre>\n<p>Bir kod edit\u00f6r\u00fc kullanarak y\u00f6netici kullan\u0131c\u0131s\u0131 ile \u015fu konutlar\u0131 uygulay\u0131n<\/p>\n<p><strong>&#8212;&#8212;&#8212;&#8212;&#8212;- CentOS\/RHEL\/Fedora &#8212;&#8212;&#8212;&#8212;&#8212;-\u00a0<\/strong>$<\/p>\n<pre>nano -w \/etc\/php.ini<\/pre>\n<p><strong>&#8212;&#8212;&#8212;&#8212;&#8212;- Debian\/Ubuntu\/Linux Mint &#8212;&#8212;&#8212;&#8212;&#8212;-<\/strong><\/p>\n<pre>sudo vi \/etc\/php\/7.0\/cli\/php.ini<\/pre>\n<p>expose_php kelimesini bulun ve de\u011ferini kapal\u0131 olarak ayarlay\u0131n. Yani \u00a0expose_php = off<\/p>\n<p>Dosyay\u0131 kaydedin ve \u00e7\u0131k\u0131n. Ard\u0131ndan sunucuyu yeniden ba\u015flat\u0131n.<\/p>\n<pre>systemctl <a href=\"https:\/\/sunucucozumleri.com\/blog\/reboot-ve-restart-arasindaki-farklar-nedir\/\">restart<\/a> httpd \r\n \r\nsystemctl restart apache2 \r\n \r\nservice httpd restart \r\n \r\nservice apache2 restart \r\n \r\n<\/pre>\n<p>Son olarak, <a href=\"https:\/\/sunucucozumleri.com\/blog\/frontpage\/\">sunucu<\/a> HTTP yan\u0131t ba\u015fl\u0131\u011f\u0131n\u0131n a\u015fa\u011f\u0131daki komutu kullanarak hala PHP s\u00fcr\u00fcm numaran\u0131z\u0131 g\u00f6sterip \u00fcretmedi\u011fini kontrol edin.<\/p>\n<pre> lynx -head -mime_header http:\/\/localhost ya da $ lynx -head -mime_header http:\/\/sunucu-adresi<\/pre>\n<p>Bol trafikli g\u00fcnler dileriz.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Merhabalar, G\u00fcvenlik sebebiyle, sald\u0131r\u0131lardan kendinizi koruman\u0131z i\u00e7in sunucunuzun zay\u0131fl\u0131klar\u0131n\u0131 \u00f6\u011frenmek isteyen sald\u0131rganlardan bazen PHP versiyonunuzu gizlemeniz gerekebilir. E\u011fer kulland\u0131\u011f\u0131n\u0131z\u00a0PHP versiyonunda bilinen g\u00fcvenlik zaafiyeti varsa, bu durum sald\u0131rganlar\u0131n i\u015fini fazlas\u0131yla kolayla\u015ft\u0131racakt\u0131r. Php versiyonunu gizlemek i\u00e7in PHP yap\u0131land\u0131rma dosyas\u0131n\u0131 d\u00fczenlemeniz gerekir. Bu yap\u0131land\u0131rma dosyas\u0131n\u0131n sunucunuzdaki yerini bilmiyorsan\u0131z, onu bulmak i\u00e7in a\u015fa\u011f\u0131daki komutu \u00e7al\u0131\u015ft\u0131r\u0131n: $ php -i | &hellip;<\/p>\n","protected":false},"author":1,"featured_media":1456,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-1128","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"acf":[],"_links":{"self":[{"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/posts\/1128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/comments?post=1128"}],"version-history":[{"count":0,"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/posts\/1128\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/media\/1456"}],"wp:attachment":[{"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/media?parent=1128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/categories?post=1128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/tags?post=1128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}