{"id":30053,"date":"2019-10-31T21:33:26","date_gmt":"2019-10-31T18:33:26","guid":{"rendered":"https:\/\/prohoster.info\/blog\/optimizatsiya-proizvoditelnosti-apache2\/"},"modified":"2019-10-31T21:33:26","modified_gmt":"2019-10-31T18:33:26","slug":"optimizatsiya-proizvoditelnosti-apache2","status":"publish","type":"post","link":"https:\/\/prohoster.info\/sq\/blog\/optimizatsiya-proizvoditelnosti-apache2","title":{"rendered":"Optimizimi i performanc\u00ebs apache2","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Shum\u00eb p\u00ebrdorin apache2 si nj\u00eb server web. Megjithat\u00eb, pak d\u00ebshmojn\u00eb p\u00ebr optimizimin e performanc\u00ebs s\u00eb tij, gj\u00eb q\u00eb ndikon drejtp\u00ebrdrejt n\u00eb shpejt\u00ebsin\u00eb e ngarkimit t\u00eb faqeve t\u00eb faqes, shpejt\u00ebsin\u00eb e p\u00ebrpunimit t\u00eb skripteve (ve\u00e7an\u00ebrisht php), si dhe n\u00eb rritjen e ngarkes\u00ebs n\u00eb CPU dhe rritjen e volumit t\u00eb p\u00ebrdoruar RAM. <\/p>\n<p>Prandaj, manuali i m\u00ebposht\u00ebm duhet t'i ndihmoj\u00eb fillestar\u00ebt (dhe jo vet\u00ebm) p\u00ebrdoruesit.<br \/>\nT\u00eb gjitha shembujt e m\u00ebposht\u00ebm jan\u00eb p\u00ebrdorur n\u00eb Raspberry PI 3, Debian 9, Apache 2.4.38, PHP 7.3.<br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><br \/>\nPra, le t\u00eb fillojm\u00eb.<\/p>\n<h3>1. \u00c7aktivizimi i moduleve t\u00eb pahumbura.<\/h3>\n<p>\nMetoda e par\u00eb \u00ebsht\u00eb thjesht \u00e7aktivizimi i moduleve q\u00eb nuk p\u00ebrdorni:<\/p>\n<p>Lista e moduleve q\u00eb po p\u00ebrdoren aktualisht mund t\u00eb shihet me komand\u00ebn:<\/p>\n<pre><code class=\"bash\">apache2ctl -M<\/code><\/pre>\n<p>\nP\u00ebr t\u00eb \u00e7aktivizuar nj\u00eb modul p\u00ebrdoret komanda:<\/p>\n<pre><code class=\"bash\">a2dismod *emri i modulit*<\/code><\/pre>\n<p>\nP\u00ebrkat\u00ebsisht, p\u00ebr t\u00eb aktivizuar nj\u00eb modul p\u00ebrdoret komanda:<\/p>\n<pre><code class=\"bash\">a2enmod *emri i modulit*<\/code><\/pre>\n<p>\nK\u00ebtu duhet t\u00eb vini re se, kur p\u00ebrdorni <i>a2dismod<\/i>, emri i modulit duhet t\u00eb shkruhet pa vet\u00eb fjal\u00ebn modul.<\/p>\n<p>P\u00ebr shembull, n\u00ebse ju n\u00eb daljen e komand\u00ebs <i>apache2ctl -M<\/i> shihni <i>proxy_module<\/i>, p\u00ebr ta \u00e7aktivizuar, duhet t\u00eb p\u00ebrdorni komand\u00ebn \u2014 <i>a2dismod proxy<\/i><\/p>\n<p>Modulet q\u00eb m\u00eb shum\u00eb ngarkojn\u00eb sistemin (sipas p\u00ebrvoj\u00ebs sime) jan\u00eb:<\/p>\n<ul>\n<li>PHP, Ruby, Perl dhe modulet e tjera p\u00ebr gjuh\u00eb skriptimi t\u00eb ndryshme<\/li>\n<li><a class=\"wpil_keyword_link\" href=\"https:\/\/prohoster.info\/sq\/ssl-sertifikat\/\"   title=\"SSL\" data-wpil-keyword-link=\"linked\"  data-wpil-monitor-id=\"2258\">SSL<\/a><\/li>\n<li>Rewrite<\/li>\n<li>CGI<\/li>\n<\/ul>\n<p>\nPrandaj, n\u00eb rastet kur k\u00ebto module nuk ju nevojiten, un\u00eb rekomandoj t'i \u00e7aktivizoni k\u00ebto module.<\/p>\n<p>Po ashtu, pas \u00e7aktivizimit t\u00eb ndonj\u00eb moduli, un\u00eb rekomandoj t\u00eb p\u00ebrdorni komand\u00ebn \u2014 <i>apache2ctl configtest<\/i>, e cila do t\u00eb kontrolloj\u00eb konfigurimin e faqeve t\u00eb p\u00ebrdorura dhe n\u00ebse ndonj\u00eb nga modulet e \u00e7aktivizuara ishte e nevojshme p\u00ebr to, do t\u00eb jap\u00eb nj\u00eb mesazh gabimi.<\/p>\n<h3>2. Ndryshimi i MPM (Moduli i Multi-P\u00ebrpunimit) dhe p\u00ebrdorimi i php-fpm<\/h3>\n<p>\nSipas parazgjedhjes, pas instalimit, apache2 p\u00ebrdor MPM Prefork (1 rrjedh\u00eb p\u00ebr 1 lidhje), e cila e ul ndjesh\u00ebm performanc\u00ebn, por p\u00ebrmir\u00ebson stabilitetin dhe sigurin\u00eb.<\/p>\n<p>Por p\u00ebr optimizimin e performanc\u00ebs, un\u00eb rekomandoj p\u00ebrdorimin e MPM Worker, i cili lejon p\u00ebrdorimin e disa rrjedhave p\u00ebr nj\u00eb lidhje.<\/p>\n<p>P\u00ebr ta aktivizuar, p\u00ebrdorni komandat e m\u00ebposhtme:<\/p>\n<pre><code class=\"bash\">a2dismod mpm_prefork  \\\/\\\/ \u00c7aktivizoni prefork\na2dismod php7.3  \\\/\\\/ \u00c7aktivizoni modul php, i cili varet nga prefork\na2enmod mpm_worker  \\\/\\\/ Aktivizoni worker\n<\/code><\/pre>\n<p>\nMegjithat\u00eb, gjat\u00eb p\u00ebrdorimit t\u00eb Worker, mund t\u00eb hasni n\u00eb nj\u00eb problem, pasi moduli php7.3 varet nga moduli Prefork.<\/p>\n<p>P\u00ebr t\u00eb zgjidhur k\u00ebt\u00eb problem, do t\u00eb instalojm\u00eb modul\u00ebn php7.3-fpm, e cila do t\u00eb p\u00ebrdoret p\u00ebr ekzekutimin e skripteve php:<\/p>\n<pre><code class=\"bash\">apt-get update && apt-get install php7.3-fpm  \/\/\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\nsystemctl enable php7.3-fpm && systemctl start php7.3-fpm  \/\/\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\na2enmod php7.3-fpm && a2enconf php7.3-fpm.conf  \/\/\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c \u0438 \u043a\u043e\u043d\u0444\u0438\u0433 \u0434\u043b\u044f \u043d\u0435\u0433\u043e\n<\/code><\/pre>\n<p>\nDuhet v\u00ebn\u00eb re se p\u00ebrdorimi i php-fpm gjithashtu do t\u00eb zvog\u00ebloj\u00eb sasin\u00eb e RAM-it t\u00eb p\u00ebrdorur nga procesi apache2 dhe do t\u00eb p\u00ebrshpejtoj\u00eb paksa ekzekutimin e skripteve php.<\/p>\n<h3>3. P\u00ebrfundimi<\/h3>\n<p>\nK\u00ebshtu, me k\u00ebto veprime t\u00eb thjeshta arrit\u00ebm t\u00eb optimizojm\u00eb performanc\u00ebn dhe t\u00eb zvog\u00eblojm\u00eb ngarkes\u00ebn n\u00eb sistem (n\u00eb k\u00ebt\u00eb rast RPI3).<\/p>\n<p>Natyrisht, ka qindra mund\u00ebsi t\u00eb tjera optimizimi, si aktivizimi i kompresimit (\u00e7ka \u00ebsht\u00eb v\u00ebrtet e dobishme, por kryesisht \u00ebsht\u00eb tashm\u00eb e aktivizuar si default), ndryshimi i parametrave (skedar\u00ebve t\u00eb konfigurimit) MPM, \u00e7aktivizimi i HostnameLookups etj., por n\u00eb k\u00ebt\u00eb artikull p\u00ebrpiqesha t\u00eb p\u00ebrshkruaja pik\u00ebrisht ato pika q\u00eb m\u00eb ndihmuan m\u00eb shum\u00eb, dhe shpresoj se do t\u00eb ndihmojn\u00eb dhe t\u00eb tjer\u00ebt.<br \/>\n<br \/>Burimi: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/444732\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041c\u043d\u043e\u0433\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 apache2 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u0430\u043b\u043e \u043a\u0442\u043e \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0431 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0435\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0447\u0442\u043e \u043f\u0440\u044f\u043c\u043e \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0441\u0430\u0439\u0442\u0430, \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 (\u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 php), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430 \u0440\u043e\u0441\u0442\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 \u0426\u041f \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0438 \u043e\u0431\u044a\u0451\u043c\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u041e\u0417\u0423. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043c\u0430\u043d\u0443\u0430\u043b, \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043c\u043e\u0447\u044c \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e) \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c. \u0412\u0441\u0435 \u043d\u0438\u0436\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-30053","post","type-post","status-publish","format-standard","hentry","category-blog"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041c\u043d\u043e\u0433\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 apache2 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/sq\/blog\/optimizatsiya-proizvoditelnosti-apache2\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"sq_AL\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 apache2 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041c\u043d\u043e\u0433\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 apache2 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/blog\/optimizatsiya-proizvoditelnosti-apache2\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T18:33:26+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T18:33:26+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Optimizimi i performanc\u00ebs apache2 | ProHoster","description":"Shum\u00eb p\u00ebrdorin apache2 si server web.","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/optimizatsiya-proizvoditelnosti-apache2","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"sq_AL","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 apache2 | ProHoster","og:description":"\u041c\u043d\u043e\u0433\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 apache2 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430.","og:url":"https:\/\/prohoster.info\/sq\/blog\/optimizatsiya-proizvoditelnosti-apache2","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T18:33:26+00:00","article:modified_time":"2019-10-31T18:33:26+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"30053","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-02-09 17:29:02","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 03:43:14","updated":"2026-02-09 17:29:02","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/30053","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/comments?post=30053"}],"version-history":[{"count":1,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/30053\/revisions"}],"predecessor-version":[{"id":159502,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/30053\/revisions\/159502"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=30053"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=30053"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=30053"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}