{"id":7788,"date":"2025-11-19T14:15:25","date_gmt":"2025-11-19T10:45:25","guid":{"rendered":"https:\/\/parsdev.com/blog\/?p=7788"},"modified":"2025-11-19T14:21:27","modified_gmt":"2025-11-19T10:51:27","slug":"how-to-install-moodle-on-ubuntu","status":"publish","type":"post","link":"https:\/\/parsdev.com/blog\/how-to-install-moodle-on-ubuntu\/","title":{"rendered":"\u0631\u0627\u0647\u0646\u0645\u0627\u06cc \u0646\u0635\u0628 Moodle \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u0633\u06cc\u0633\u062a\u0645 \u0622\u0645\u0648\u0632\u0634 \u0622\u0646\u0644\u0627\u06cc\u0646 \u0634\u062e\u0635\u06cc"},"content":{"rendered":"<p>Moodle \u06cc\u06a9 \u0633\u06cc\u0633\u062a\u0645 \u0645\u062f\u06cc\u0631\u06cc\u062a \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0622\u0646\u0644\u0627\u06cc\u0646 (LMS) \u0631\u0627\u06cc\u06af\u0627\u0646 \u0648 \u0645\u062a\u0646\u200c\u0628\u0627\u0632 \u0627\u0633\u062a \u06a9\u0647 \u0628\u0647 \u0645\u0631\u0628\u06cc\u0627\u0646 \u0627\u062c\u0627\u0632\u0647 \u0645\u06cc\u200c\u062f\u0647\u062f \u06cc\u06a9 \u0648\u0628\u200c\u0633\u0627\u06cc\u062a \u06a9\u0627\u0645\u0644\u0627\u064b \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0628\u0631\u0627\u06cc \u062f\u0648\u0631\u0647\u200c\u0647\u0627\u06cc \u0622\u0645\u0648\u0632\u0634\u06cc \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u0646\u062f \u06a9\u0647 \u0628\u0627 \u06cc\u06a9 \u062a\u062c\u0631\u0628\u0647 \u06a9\u0644\u0627\u0633 \u0622\u0646\u0644\u0627\u06cc\u0646 \u062a\u06a9\u0645\u06cc\u0644 \u0645\u06cc\u200c\u0634\u0648\u062f. \u0627\u06cc\u0646 \u0631\u0627\u0647\u0646\u0645\u0627 \u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Moodle \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648 \u06f2\u06f2.\u06f0\u06f4 \u0631\u0627 \u062a\u0648\u0636\u06cc\u062d \u0645\u06cc\u200c\u062f\u0647\u062f.<!--more--><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_79_2 ez-toc-wrap-center counter-hierarchy ez-toc-counter-rtl ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<span class=\"ez-toc-title\" style=\"cursor:inherit\">\u0622\u0646\u0686\u0647 \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0637\u0644\u0628 \u062e\u0648\u0627\u0647\u06cc\u062f \u062e\u0648\u0627\u0646\u062f<\/span>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #473ba7;color:#473ba7\" xmlns=\"https:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #473ba7;color:#473ba7\" class=\"arrow-unsorted-368013\" xmlns=\"https:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/parsdev.com/blog\/how-to-install-moodle-on-ubuntu\/#%d9%be%db%8c%d8%b4%e2%80%8c%d9%86%db%8c%d8%a7%d8%b2%d9%87%d8%a7\" >\u067e\u06cc\u0634\u200c\u0646\u06cc\u0627\u0632\u0647\u0627<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/parsdev.com/blog\/how-to-install-moodle-on-ubuntu\/#%db%b1_%d9%be%db%8c%da%a9%d8%b1%d8%a8%d9%86%d8%af%db%8c_%d9%81%d8%a7%db%8c%d8%b1%d9%88%d8%a7%d9%84\" >\u06f1. \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0641\u0627\u06cc\u0631\u0648\u0627\u0644<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/parsdev.com/blog\/how-to-install-moodle-on-ubuntu\/#%db%b2_%d9%86%d8%b5%d8%a8_nginx\" >\u06f2. \u0646\u0635\u0628 Nginx<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/parsdev.com/blog\/how-to-install-moodle-on-ubuntu\/#%db%b3_%d9%86%d8%b5%d8%a8_%d9%88_%d9%be%db%8c%da%a9%d8%b1%d8%a8%d9%86%d8%af%db%8c_php\" >\u06f3. \u0646\u0635\u0628 \u0648 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc PHP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/parsdev.com/blog\/how-to-install-moodle-on-ubuntu\/#%db%b4_%d9%86%d8%b5%d8%a8_%d9%88_%d9%be%db%8c%da%a9%d8%b1%d8%a8%d9%86%d8%af%db%8c_mysql\" >\u06f4. \u0646\u0635\u0628 \u0648 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc MySQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/parsdev.com/blog\/how-to-install-moodle-on-ubuntu\/#%db%b5_%d9%86%d8%b5%d8%a8_%d9%85%d9%88%d8%af%d9%84_%d8%b1%d9%88%db%8c_%d8%a7%d9%88%d8%a8%d9%88%d9%86%d8%aa%d9%88\" >\u06f5. \u0646\u0635\u0628 \u0645\u0648\u062f\u0644 \u0631\u0648\u06cc \u0627\u0648\u0628\u0648\u0646\u062a\u0648<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/parsdev.com/blog\/how-to-install-moodle-on-ubuntu\/#%db%b7_%d9%86%d8%b5%d8%a8_ssl\" >\u06f7. \u0646\u0635\u0628 SSL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/parsdev.com/blog\/how-to-install-moodle-on-ubuntu\/#%db%b8_%d9%be%db%8c%da%a9%d8%b1%d8%a8%d9%86%d8%af%db%8c_nginx\" >\u06f8. \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc Nginx<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/parsdev.com/blog\/how-to-install-moodle-on-ubuntu\/#%db%b9_%d9%86%d8%b5%d8%a8_%da%a9%d8%a7%d9%85%d9%84_%d9%85%d9%88%d8%af%d9%84\" >\u06f9. \u0646\u0635\u0628 \u06a9\u0627\u0645\u0644 \u0645\u0648\u062f\u0644<\/a><\/li><\/ul><\/nav><\/div>\n<h4><span class=\"ez-toc-section\" id=\"%d9%be%db%8c%d8%b4%e2%80%8c%d9%86%db%8c%d8%a7%d8%b2%d9%87%d8%a7\"><\/span>\u067e\u06cc\u0634\u200c\u0646\u06cc\u0627\u0632\u0647\u0627<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li>\u06cc\u06a9 \u0633\u0631\u0648\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648 \u06f2\u06f2.\u06f0\u06f4 \u0631\u0627\u0647\u200c\u0627\u0646\u062f\u0627\u0632\u06cc \u06a9\u0646\u06cc\u062f.<\/li>\n<li>\u06cc\u06a9 \u06a9\u0627\u0631\u0628\u0631 \u063a\u06cc\u0631 root \u0628\u0627 \u0627\u0645\u062a\u06cc\u0627\u0632\u0627\u062a sudo \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f.<\/li>\n<li>\u0633\u0631\u0648\u0631 \u0631\u0627 \u0628\u0647\u200c\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u06a9\u0646\u06cc\u062f.<\/li>\n<li>\u06cc\u06a9 \u062f\u0627\u0645\u0646\u0647 \u06a9\u0627\u0645\u0644\u0627 \u0645\u0639\u062a\u0628\u0631 \u06a9\u0647 \u0628\u0647 \u0633\u0631\u0648\u0631 \u0634\u0645\u0627 \u0627\u0634\u0627\u0631\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f\u060c \u0645\u0627\u0646\u0646\u062f moodle.example.com<\/li>\n<\/ul>\n<p>\u0646\u0645\u0648\u0646\u0647\u200c\u0647\u0627\u06cc \u06a9\u062f \u0648 \u0641\u0627\u06cc\u0644\u200c\u0647\u0627\u06cc \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0637\u0644\u0628 \u0627\u0632 moodle.example.com \u0648 example.com \u0628\u0631\u0627\u06cc \u0627\u0647\u062f\u0627\u0641 \u0646\u0645\u0627\u06cc\u0634\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f. \u0634\u0645\u0627 \u0628\u0627\u06cc\u062f \u0647\u0645\u0647 \u0645\u0648\u0627\u0631\u062f \u0631\u0627 \u0628\u0647 \u0646\u0627\u0645 \u062f\u0627\u0645\u0646\u0647 \u062e\u0648\u062f \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u06cc\u062f.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"%db%b1_%d9%be%db%8c%da%a9%d8%b1%d8%a8%d9%86%d8%af%db%8c_%d9%81%d8%a7%db%8c%d8%b1%d9%88%d8%a7%d9%84\"><\/span>\u06f1. \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0641\u0627\u06cc\u0631\u0648\u0627\u0644<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Moodle \u0628\u0631\u0627\u06cc \u0639\u0645\u0644\u06a9\u0631\u062f \u0628\u0647 \u067e\u0648\u0631\u062a\u200c\u0647\u0627\u06cc HTTP \u0648 HTTPS \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u062f.<br \/>\n\u0622\u0646\u0647\u0627 \u0631\u0627 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0641\u0627\u06cc\u0631\u0648\u0627\u0644 UFW \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo ufw allow http\r\nsudo ufw allow https\r\n<\/pre>\n<p>\u0648\u0636\u0639\u06cc\u062a \u0641\u0627\u06cc\u0631\u0648\u0627\u0644 \u0631\u0627 \u0628\u0631\u0631\u0633\u06cc \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo ufw status\r\n<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"%db%b2_%d9%86%d8%b5%d8%a8_nginx\"><\/span>\u06f2. \u0646\u0635\u0628 Nginx<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u0627\u0648\u0628\u0648\u0646\u062a\u0648 \u06f2\u06f2.\u06f0\u06f4 \u0628\u0627 \u0646\u0633\u062e\u0647 \u0642\u062f\u06cc\u0645\u06cc\u200c\u062a\u0631 Nginx \u0639\u0631\u0636\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f. \u0627\u06cc\u0646 \u0645\u0637\u0644\u0628 \u062a\u0631\u062c\u06cc\u062d \u0645\u06cc\u200c\u062f\u0647\u062f \u0627\u0632 \u0645\u062e\u0632\u0646 \u0631\u0633\u0645\u06cc Nginx \u0628\u0631\u0627\u06cc \u0646\u0635\u0628 \u0622\u062e\u0631\u06cc\u0646 \u0646\u0633\u062e\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u062f.<\/p>\n<p>\u0646\u0635\u0628 \u0648\u0627\u0628\u0633\u062a\u06af\u06cc\u200c\u0647\u0627\u06cc \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632 \u0628\u0631\u0627\u06cc \u0646\u0635\u0628 Nginx<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring -y\r\n<\/pre>\n<p>\u0648\u0627\u0631\u062f \u06a9\u0631\u062f\u0646 \u06a9\u0644\u06cc\u062f \u0627\u0645\u0636\u0627\u06cc Nginx<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nurl https:\/\/nginx.org\/keys\/nginx_signing.key | gpg --dearmor \\\r\n| sudo tee \/usr\/share\/keyrings\/nginx-archive-keyring.gpg &gt;\/dev\/null\r\n<\/pre>\n<p>\u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f\u0646 \u0645\u062e\u0632\u0646 \u0646\u0633\u062e\u0647 \u067e\u0627\u06cc\u062f\u0627\u0631 Nginx<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\necho &quot;deb &#x5B;signed-by=\/usr\/share\/keyrings\/nginx-archive-keyring.gpg arch=amd64] \\\r\nhttps:\/\/nginx.org\/packages\/ubuntu `lsb_release -cs` nginx&quot; \\\r\n| sudo tee \/etc\/apt\/sources.list.d\/nginx.list\r\n<\/pre>\n<p>\u0628\u0647\u200c\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc \u0644\u06cc\u0633\u062a \u0645\u062e\u0627\u0632\u0646 \u0633\u06cc\u0633\u062a\u0645<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo apt update\r\n<\/pre>\n<p>\u0646\u0635\u0628 \u0633\u0631\u0648\u0631 Nginx<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo apt install nginx\r\n<\/pre>\n<p>\u0628\u0631\u0631\u0633\u06cc \u0646\u0635\u0628<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nnginx -v\r\n<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"%db%b3_%d9%86%d8%b5%d8%a8_%d9%88_%d9%be%db%8c%da%a9%d8%b1%d8%a8%d9%86%d8%af%db%8c_php\"><\/span>\u06f3. \u0646\u0635\u0628 \u0648 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc PHP<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u0622\u062e\u0631\u06cc\u0646 \u0646\u0633\u062e\u0647 Moodle (\u0646\u0633\u062e\u0647 \u06f4.\u06f0.\u06f2) \u0628\u0647 PHP 8.0 \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u062f. \u0645\u062e\u0632\u0646 PHP Ondrej \u0631\u0627 \u0628\u0631\u0627\u06cc \u0627\u0641\u0632\u0648\u062f\u0646 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0627\u0632 PHP 8.0 \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo add-apt-repository ppa:ondrej\/php -y\r\n<\/pre>\n<p>\u0646\u0635\u0628 PHP \u0648 \u0627\u0641\u0632\u0648\u0646\u0647\u200c\u0647\u0627\u06cc \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo apt install graphviz aspell ghostscript clamav php8.0-fpm php8.0-cli php8.0-pspell php8.0-curl php8.0-gd php8.0-intl php8.0-mysql php8.0-xml php8.0-xmlrpc php8.0-ldap php8.0-zip php8.0-soap php8.0-mbstring\r\n<\/pre>\n<p>\u0641\u0627\u06cc\u0644 \/etc\/php\/8.0\/fpm\/pool.d\/www.conf \u0631\u0627 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo nano \/etc\/php\/8.0\/fpm\/pool.d\/www.conf\r\n<\/pre>\n<p>\u062e\u0637\u0648\u0637 user=apache \u0648 group=apache \u0631\u0627 \u062f\u0631 \u0641\u0627\u06cc\u0644 \u067e\u06cc\u062f\u0627 \u06a9\u0646\u06cc\u062f \u0648 \u0622\u0646\u0647\u0627 \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n; Unix user\/group of processes\r\n; Note: The user is mandatory. If the group is not set, the default user&#039;s group\r\n; will be used.\r\nuser = nginx\r\ngroup = nginx\r\n...\r\n<\/pre>\n<p>\u0647\u0645\u0686\u0646\u06cc\u0646\u060c \u062e\u0637\u0648\u0637 listen.owner=www-data \u0648 listen.group=www-data \u0631\u0627 \u062f\u0631 \u0641\u0627\u06cc\u0644 \u067e\u06cc\u062f\u0627 \u06a9\u0646\u06cc\u062f \u0648 \u0622\u0646\u0647\u0627 \u0631\u0627 \u0628\u0647 nginx \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n...\r\n...\r\nlisten.owner = nginx\r\nlisten.group = nginx\r\n...\r\n<\/pre>\n<p>\u0641\u0627\u06cc\u0644 \u0631\u0627 \u0628\u0627 \u0641\u0634\u0627\u0631 \u062f\u0627\u062f\u0646 Ctrl+X \u0648 \u0633\u067e\u0633 Y \u0630\u062e\u06cc\u0631\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<p>\u0633\u0631\u0648\u06cc\u0633 PHP-FPM \u0631\u0627 \u0631\u06cc\u0633\u062a\u0627\u0631\u062a \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo systemctl restart php8.0-fpm\r\n<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"%db%b4_%d9%86%d8%b5%d8%a8_%d9%88_%d9%be%db%8c%da%a9%d8%b1%d8%a8%d9%86%d8%af%db%8c_mysql\"><\/span>\u06f4. \u0646\u0635\u0628 \u0648 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc MySQL<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u0633\u0631\u0648\u0631 MySQL \u0631\u0627 \u0646\u0635\u0628 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo apt install mysql-server\r\n<\/pre>\n<p>\u0645\u0631\u062d\u0644\u0647 \u0632\u06cc\u0631 \u0628\u0631\u0627\u06cc \u0646\u0633\u062e\u0647\u200c\u0647\u0627\u06cc \u06f8.\u06f0.\u06f2\u06f8 \u0648 \u0628\u0627\u0644\u0627\u062a\u0631 MySQL \u0636\u0631\u0648\u0631\u06cc \u0627\u0633\u062a. \u0648\u0627\u0631\u062f \u067e\u0648\u0633\u062a\u0647 MySQL \u0634\u0648\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo mysql\r\n<\/pre>\n<p>\u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0631\u0627\u06cc \u062a\u0646\u0638\u06cc\u0645 \u0631\u0645\u0632 \u0639\u0628\u0648\u0631 \u0628\u0631\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631 \u0631\u06cc\u0634\u0647 \u062e\u0648\u062f \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f. \u0645\u0637\u0645\u0626\u0646 \u0634\u0648\u06cc\u062f \u06a9\u0647 \u062a\u0631\u06a9\u06cc\u0628\u06cc \u0627\u0632 \u0627\u0639\u062f\u0627\u062f\u060c \u062d\u0631\u0648\u0641 \u0628\u0632\u0631\u06af\u060c \u062d\u0631\u0648\u0641 \u06a9\u0648\u0686\u06a9 \u0648 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627\u06cc \u0648\u06cc\u0698\u0647 \u0628\u0627\u0634\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmysql&gt; ALTER USER &#039;root&#039;@&#039;localhost&#039; IDENTIFIED WITH mysql_native_password BY &#039;yourrootpassword&#039;;\r\n<\/pre>\n<p>\u0627\u0632 \u0634\u0650\u0644 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmysql&gt; exit\r\n<\/pre>\n<p>\u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0646\u0635\u0628 \u0627\u0645\u0646 \u0631\u0627 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo mysql_secure_installation\r\n<\/pre>\n<p>\u0628\u0631\u0627\u06cc \u0627\u06cc\u0645\u0646\u200c\u0633\u0627\u0632\u06cc MySQL \u0628\u0647 \u0633\u0648\u0627\u0644\u0627\u062a \u0632\u06cc\u0631 \u067e\u0627\u0633\u062e \u062f\u0647\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">&lt;\/pre&gt;\r\nWould you like to setup VALIDATE PASSWORD component?\r\nPress y|Y for Yes, any other key for No: (Enter Y)\r\n\r\nPlease enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: (Enter 2)\r\nChange the password for root ? ((Press y|Y for Yes, any other key for No) : (Enter N)\r\nRemove anonymous users? (Press y|Y for Yes, any other key for No) : (Enter Y)\r\nDisallow root login remotely? (Press y|Y for Yes, any other key for No) : (Enter Y)\r\nRemove test database and access to it? (Press y|Y for Yes, any other key for No) : Y (Enter Y)\r\nReload privilege tables now? (Press y|Y for Yes, any other key for No) : (Enter Y)\r\n&lt;pre&gt;<\/pre>\n<p>\u0648\u0627\u0631\u062f \u0634\u0650\u0644 MySQL \u0634\u0648\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo mysql -u root -p\r\n<\/pre>\n<p>\u06cc\u06a9 \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647 \u0628\u0631\u0627\u06cc Moodle \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmysql &gt; CREATE DATABASE moodledb DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\r\n<\/pre>\n<p>\u06cc\u06a9 \u06a9\u0627\u0631\u0628\u0631 SQL \u0628\u0631\u0627\u06cc \u062f\u0633\u062a\u0631\u0633\u06cc \u0628\u0647 \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f. yourpassword \u0631\u0627 \u0628\u0627 \u06cc\u06a9 \u0631\u0645\u0632 \u0639\u0628\u0648\u0631 \u0642\u0648\u06cc \u062f\u0644\u062e\u0648\u0627\u0647 \u062e\u0648\u062f \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmysql &gt; CREATE USER &#039;moodleuser&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;yourpassword&#039;;\r\n<\/pre>\n<p>\u0628\u0647 moodleuser \u062f\u0633\u062a\u0631\u0633\u06cc \u0628\u0647 \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647 \u0631\u0627 \u0627\u0639\u0637\u0627 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmysql &gt; GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodledb.* TO moodleuser@localhost;\r\n<\/pre>\n<p>\u062c\u062f\u0648\u0644 \u0627\u0645\u062a\u06cc\u0627\u0632\u0627\u062a \u0631\u0627 \u0631\u06cc\u0644\u0648\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmysql &gt; FLUSH PRIVILEGES;\r\n<\/pre>\n<p>\u0627\u0632 \u0634\u0650\u0644 \u062e\u0627\u0631\u062c \u0634\u0648\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmysql &gt; exit\r\n<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"%db%b5_%d9%86%d8%b5%d8%a8_%d9%85%d9%88%d8%af%d9%84_%d8%b1%d9%88%db%8c_%d8%a7%d9%88%d8%a8%d9%88%d9%86%d8%aa%d9%88\"><\/span>\u06f5. \u0646\u0635\u0628 \u0645\u0648\u062f\u0644 \u0631\u0648\u06cc \u0627\u0648\u0628\u0648\u0646\u062a\u0648<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u0639\u0645\u0648\u0645\u06cc \u0628\u0631\u0627\u06cc \u0645\u0648\u062f\u0644 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo mkdir \/var\/www\/html\/moodle -p\r\n<\/pre>\n<p>\u0628\u0647 \u06a9\u0627\u0631\u0628\u0631 \u0648\u0627\u0631\u062f \u0634\u062f\u0647 \u062f\u0633\u062a\u0631\u0633\u06cc \u0628\u0647 \u0627\u06cc\u0646 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u0631\u0627 \u0628\u062f\u0647\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo chown -R $USER:$USER \/var\/www\/html\/moodle\r\n<\/pre>\n<p>\u0628\u0647 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u0639\u0645\u0648\u0645\u06cc \u0628\u0631\u0648\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncd \/var\/www\/html\/moodle\r\n<\/pre>\n<p>\u0645\u062e\u0632\u0646 \u06af\u06cc\u062a\u200c\u0647\u0627\u0628 \u0645\u0648\u062f\u0644 \u0631\u0627 \u06a9\u0644\u0648\u0646 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ngit clone https:\/\/github.com\/moodle\/moodle.git .\r\n<\/pre>\n<p>\u0644\u06cc\u0633\u062a \u0628\u0631\u0646\u0686\u200c\u0647\u0627\u06cc \u0645\u0648\u062c\u0648\u062f \u0631\u0627 \u0628\u0631\u0631\u0633\u06cc \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ngit branch -a\r\n<\/pre>\n<p>\u062f\u0631 \u062d\u0627\u0644 \u062d\u0627\u0636\u0631\u060c MOODLE_400_STABLE \u0622\u062e\u0631\u06cc\u0646 \u0646\u0633\u062e\u0647 \u0645\u0648\u062c\u0648\u062f \u0627\u0633\u062a. \u06cc\u06a9 \u0634\u0627\u062e\u0647 \u0645\u062d\u0644\u06cc \u0628\u0647 \u0646\u0627\u0645 MOODLE_400_STABLE \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f \u0648 \u0622\u0646 \u0631\u0627 \u0637\u0648\u0631\u06cc \u062a\u0646\u0638\u06cc\u0645 \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u0634\u0627\u062e\u0647 \u0631\u0627\u0647 \u062f\u0648\u0631 \u0631\u0627 \u0631\u062f\u06cc\u0627\u0628\u06cc \u06a9\u0646\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ngit branch --track MOODLE_400_STABLE origin\/MOODLE_400_STABLE\r\n<\/pre>\n<p>\u0628\u0647 \u0634\u0627\u062e\u0647 \u0645\u062d\u0644\u06cc \u062a\u0627\u0632\u0647 \u0627\u06cc\u062c\u0627\u062f \u0634\u062f\u0647 \u0628\u0631\u0648\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ngit checkout MOODLE_400_STABLE\r\n<\/pre>\n<p>\u06cc\u06a9 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u062f\u0627\u062f\u0647 \u0628\u0631\u0627\u06cc \u0645\u0648\u062f\u0644 \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo mkdir \/var\/moodledata\r\n<\/pre>\n<p>\u0645\u062c\u0648\u0632\u0647\u0627\u06cc \u0645\u0646\u0627\u0633\u0628 \u0631\u0627 \u0628\u0647 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u062f\u0627\u062f\u0647 \u0645\u0648\u062f\u0644 \u0628\u062f\u0647\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo chown -R nginx \/var\/moodledata\r\nsudo chmod -R 775 \/var\/moodledata\r\n<\/pre>\n<p>\u0645\u062c\u0648\u0632\u0647\u0627\u06cc \u0646\u0648\u0634\u062a\u0646 \u0631\u0627 \u062f\u0631 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u0645\u0648\u062f\u0644 \u0628\u062f\u0647\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo chmod -R 755 \/var\/www\/html\/moodle\r\n<\/pre>\n<p>\u06f6. \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0645\u0648\u062f\u0644<\/p>\n<p>\u0628\u0647 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u0645\u0648\u062f\u0644 \u0628\u0631\u0648\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncd \/var\/www\/html\/moodle\r\n<\/pre>\n<p>\u0627\u0632 \u0641\u0627\u06cc\u0644 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0646\u0645\u0648\u0646\u0647 \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0645\u0648\u062f\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncp config-dist.php config.php\r\n<\/pre>\n<p>\u0641\u0627\u06cc\u0644 config.php \u0631\u0627 \u0628\u0631\u0627\u06cc \u0648\u06cc\u0631\u0627\u06cc\u0634 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nnano config.php\r\n<\/pre>\n<p>\u0628\u0647 \u062f\u0646\u0628\u0627\u0644 \u0628\u062e\u0634 \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647 \u0628\u06af\u0631\u062f\u06cc\u062f\u060c \u0633\u067e\u0633 \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0630\u062e\u06cc\u0631\u0647 \u062f\u0627\u062f\u0647\u200c\u0647\u0627\u06cc \u0645\u0648\u062f\u0644\u060c \u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u062f\u0631 \u0632\u06cc\u0631 \u0646\u0634\u0627\u0646 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a\u060c \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$CFG-&amp;amp;gt;dbtype = &#039;mysqli&#039;; \/\/ &#039;pgsql&#039;, &#039;mariadb&#039;, &#039;mysqli&#039;, &#039;auroramysql&#039;, &#039;sqlsrv&#039; or &#039;oci&#039;\r\n$CFG-&amp;amp;gt;dblibrary = &#039;native&#039;; \/\/ &#039;native&#039; only at the moment\r\n$CFG-&amp;amp;gt;dbhost = &#039;localhost&#039;; \/\/ eg &#039;localhost&#039; or &#039;db.isp.com&#039; or IP\r\n$CFG-&amp;amp;gt;dbname = &#039;moodledb&#039;; \/\/ database name, eg moodle\r\n$CFG-&amp;amp;gt;dbuser = &#039;moodleuser&#039;; \/\/ your database username\r\n$CFG-&amp;amp;gt;dbpass = &#039;yourpassword&#039;; \/\/ your database password\r\n$CFG-&amp;amp;gt;prefix = &#039;mdl_&#039;; \/\/ prefix to use for all table names\r\n<\/pre>\n<p>\u0647\u0645\u0686\u0646\u06cc\u0646\u060c \u0645\u06a9\u0627\u0646 URL \u0648\u0628 Moodle \u0648 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u062f\u0627\u062f\u0647\u200c\u0647\u0627 \u0631\u0627 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n...\r\n$CFG-&amp;amp;gt;wwwroot = &#039;https:\/\/moodle.example.com&#039;;\r\n...\r\n$CFG-&amp;amp;gt;dataroot = &#039;\/var\/moodledata&#039;;\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0641\u0627\u06cc\u0644 \u0631\u0627 \u0628\u0627 \u0641\u0634\u0627\u0631 \u062f\u0627\u062f\u0646 Ctrl+X \u0648 \u0633\u067e\u0633 Y \u0630\u062e\u06cc\u0631\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<blockquote><p>\u0628\u0631\u0627\u06cc \u067e\u0631\u0648\u0698\u0647\u200c\u0647\u0627\u06cc \u0645\u0647\u0645 \u062e\u0648\u062f \u0628\u0647 \u062f\u0646\u0628\u0627\u0644 \u0633\u0631\u0648\u0631 \u0645\u0637\u0645\u0626\u0646 \u0647\u0633\u062a\u06cc\u062f\u061f <a href=\"https:\/\/parsdev.com\/vps\" target=\"_blank\" rel=\"noopener\">\u062e\u0631\u06cc\u062f \u0633\u0631\u0648\u0631 \u0645\u062c\u0627\u0632\u06cc<\/a> \u0628\u0627 IP \u062b\u0627\u0628\u062a \u0648 \u0633\u0631\u0639\u062a \u0628\u0627\u0644\u0627 \u062f\u0631 \u067e\u0627\u0631\u0633\u062f\u0648\u060c \u06af\u0632\u06cc\u0646\u0647\u200c\u0627\u06cc \u0627\u06cc\u062f\u0647\u200c\u0622\u0644 \u0627\u0633\u062a.<\/p><\/blockquote>\n<h4>\u06f7. \u0646\u0635\u0628 SSL<\/h4>\n<p>\u0628\u0631\u0627\u06cc \u0646\u0635\u0628 \u06af\u0648\u0627\u0647\u06cc\u0646\u0627\u0645\u0647\u200c\u0647\u0627\u06cc SSL \u0628\u0647 \u0627\u0628\u0632\u0627\u0631 Certbot \u06a9\u0647 \u0627\u0632 Let&#8217;s Encrypt API \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f\u060c \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u06cc\u062f. \u0622\u062e\u0631\u06cc\u0646 \u0646\u0633\u062e\u0647 Certbot \u0627\u0632 \u0637\u0631\u06cc\u0642 \u0641\u0631\u0648\u0634\u06af\u0627\u0647 Snap \u062f\u0631 \u062f\u0633\u062a\u0631\u0633 \u0627\u0633\u062a.<\/p>\n<p>\u0628\u0631\u0627\u06cc \u0627\u0637\u0645\u06cc\u0646\u0627\u0646 \u0627\u0632 \u062f\u0627\u0634\u062a\u0646 \u0622\u062e\u0631\u06cc\u0646 \u0646\u0633\u062e\u0647 snapd\u060c \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0632\u06cc\u0631 \u0631\u0627 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo snap install core\r\nsudo snap refresh core\r\n<\/pre>\n<p>Certbot \u0631\u0627 \u0646\u0635\u0628 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo snap install --classic certbot\r\n<\/pre>\n<p>\u06cc\u06a9 \u0644\u06cc\u0646\u06a9 \u0646\u0645\u0627\u062f\u06cc\u0646 \u0628\u0631\u0627\u06cc Certbot \u0628\u0647 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \/usr\/bin \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo ln -s \/snap\/bin\/certbot \/usr\/bin\/certbot\r\n<\/pre>\n<p>\u06af\u0648\u0627\u0647\u06cc SSL \u0631\u0627 \u0635\u0627\u062f\u0631 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo certbot certonly --standalone --agree-tos --no-eff-email --staple-ocsp --preferred-challenges http -m name@example.com -d moodle.example.com\r\n<\/pre>\n<p>\u06cc\u06a9 \u06af\u0648\u0627\u0647\u06cc \u06af\u0631\u0648\u0647 Diffie-Hellman \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo openssl dhparam -dsaparam -out \/etc\/ssl\/certs\/dhparam.pem 4096\r\n<\/pre>\n<p>\u0641\u0627\u06cc\u0644 \/etc\/letsencrypt\/renewal\/moodle.example.com.conf \u0631\u0627 \u0628\u0631\u0627\u06cc \u0648\u06cc\u0631\u0627\u06cc\u0634 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo nano \/etc\/letsencrypt\/renewal\/moodle.example.com.conf\r\n<\/pre>\n<p>\u06a9\u062f \u0632\u06cc\u0631 \u0631\u0627 \u062f\u0631 \u067e\u0627\u06cc\u06cc\u0646 \u0642\u0631\u0627\u0631 \u062f\u0647\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\npre_hook = systemctl stop nginx\r\npost_hook = systemctl start nginx\r\n<\/pre>\n<p>\u0641\u0627\u06cc\u0644 \u0631\u0627 \u0628\u0627 \u0641\u0634\u0627\u0631 \u062f\u0627\u062f\u0646 Ctrl+X \u0648 \u0648\u0627\u0631\u062f \u06a9\u0631\u062f\u0646 Y \u062f\u0631 \u0635\u0648\u0631\u062a \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0630\u062e\u06cc\u0631\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<p>\u06af\u0632\u06cc\u0646\u0647 \u0645\u0633\u062a\u0642\u0644 Certbot \u0627\u0632 \u0648\u0628 \u0633\u0631\u0648\u0631 \u062e\u0648\u062f \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u06af\u0648\u0627\u0647\u06cc \u06a9\u0647 \u0628\u0627 Nginx \u06a9\u0627\u0631 \u0646\u0645\u06cc\u200c\u06a9\u0646\u062f\u060c \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u062f\u0633\u062a\u0648\u0631\u0627\u062a pre_hook \u0648 post_hook \u0642\u0628\u0644 \u0648 \u0628\u0639\u062f \u0627\u0632 \u062a\u0645\u062f\u06cc\u062f \u0627\u062c\u0631\u0627 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f \u062a\u0627 \u0633\u0631\u0648\u0631 Nginx \u0631\u0627 \u0628\u062f\u0648\u0646 \u062f\u062e\u0627\u0644\u062a \u062f\u0633\u062a\u06cc \u0628\u0647 \u0637\u0648\u0631 \u062e\u0648\u062f\u06a9\u0627\u0631 \u062e\u0627\u0645\u0648\u0634 \u0648 \u0645\u062c\u062f\u062f\u0627\u064b \u0631\u0627\u0647\u200c\u0627\u0646\u062f\u0627\u0632\u06cc \u06a9\u0646\u0646\u062f.<\/p>\n<p>\u0628\u0631\u0627\u06cc \u0627\u0637\u0645\u06cc\u0646\u0627\u0646 \u0627\u0632 \u0639\u0645\u0644\u06a9\u0631\u062f \u0635\u062d\u06cc\u062d\u060c \u06cc\u06a9 \u0627\u062c\u0631\u0627\u06cc \u0622\u0632\u0645\u0627\u06cc\u0634\u06cc \u0627\u0632 \u0641\u0631\u0622\u06cc\u0646\u062f \u062a\u0645\u062f\u06cc\u062f SSL \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo certbot renew --dry-run\r\n<\/pre>\n<h4>\u06f8. \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc Nginx<\/h4>\n<p>\u0641\u0627\u06cc\u0644 nginx.conf \u0631\u0627 \u0628\u0631\u0627\u06cc \u0648\u06cc\u0631\u0627\u06cc\u0634 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo nano \/etc\/nginx\/nginx.conf\r\n<\/pre>\n<p>\u062e\u0637 include \/etc\/nginx\/conf.d\/*.conf \u0631\u0627 \u067e\u06cc\u062f\u0627 \u06a9\u0646\u06cc\u062f \u0648 \u06a9\u062f \u0632\u06cc\u0631 \u0631\u0627 \u062f\u0631 \u0632\u06cc\u0631 \u0622\u0646 \u0642\u0631\u0627\u0631 \u062f\u0647\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nserver_names_hash_bucket_size 64;\r\n<\/pre>\n<p>\u0641\u0627\u06cc\u0644 \u0631\u0627 \u0628\u0627 \u0641\u0634\u0627\u0631 \u062f\u0627\u062f\u0646 Ctrl+X \u0648 \u0633\u067e\u0633 Y \u0630\u062e\u06cc\u0631\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<p>\u0641\u0627\u06cc\u0644 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc Moodle \u0631\u0627 \u0628\u0631\u0627\u06cc Nginx \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f \u0648 \u0622\u0646 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0648\u06cc\u0631\u0627\u06cc\u0634 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo nano \/etc\/nginx\/conf.d\/moodle.conf\r\n<\/pre>\n<p>\u06a9\u062f \u0632\u06cc\u0631 \u0631\u0627 \u062f\u0631 \u0622\u0646 \u0642\u0631\u0627\u0631 \u062f\u0647\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n# Redirect HTTP to HTTPS\r\nserver {\r\nlisten 80; listen &#x5B;::]:80;\r\nserver_name moodle.example.com;\r\nreturn 301 https:\/\/$host$request_uri;\r\n}\r\n\r\nserver {\r\nlisten 443 ssl http2;\r\nlisten &#x5B;::]:443 ssl http2;\r\n\r\nserver_name moodle.example.com;\r\nroot \/var\/www\/html\/moodle;\r\nindex index.php;\r\n\r\nssl_certificate \/etc\/letsencrypt\/live\/moodle.example.com\/fullchain.pem;\r\nssl_certificate_key \/etc\/letsencrypt\/live\/moodle.example.com\/privkey.pem;\r\nssl_trusted_certificate \/etc\/letsencrypt\/live\/moodle.example.com\/chain.pem;\r\nssl_session_timeout 1d;\r\nssl_session_cache shared:MozSSL:10m;\r\nssl_session_tickets off;\r\nssl_stapling on;\r\nssl_stapling_verify on;\r\nssl_dhparam \/etc\/ssl\/certs\/dhparam.pem;\r\n\r\nssl_protocols TLSv1.2 TLSv1.3;\r\nssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;\r\n\r\naccess_log \/var\/log\/nginx\/moodle.access.log main;\r\nerror_log \/var\/log\/nginx\/moodle.error.log;\r\n\r\nlocation \/ {\r\ntry_files $uri $uri\/ \/index.php?$query_string;\r\n}\r\n\r\nlocation ~ ^(.+\\.php)(.*)$ {\r\nfastcgi_split_path_info ^(.+\\.php)(.*)$;\r\nfastcgi_index index.php;\r\nfastcgi_pass unix:\/run\/php\/php8.0-fpm.sock;\r\ninclude \/etc\/nginx\/mime.types;\r\ninclude fastcgi_params;\r\nfastcgi_param PATH_INFO $fastcgi_path_info;\r\nfastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n}\r\n\r\n# Hide all dot files but allow &quot;Well-Known URIs&quot; as per RFC 5785\r\nlocation ~ \/\\.(?!well-known).* {\r\nreturn 404;\r\n}\r\n\r\n# This should be after the php fpm rule and very close to the last nginx ruleset.\r\n# Don&#039;t allow direct access to various internal files. See MDL-69333\r\nlocation ~ (\/vendor\/|\/node_modules\/|composer\\.json|\/readme|\/README|readme\\.txt|\/upgrade\\.txt|db\/install\\.xml|\/fixtures\/|\/behat\/|phpunit\\.xml|\\.lock|environment\\.xml) {\r\ndeny all;\r\nreturn 404;\r\n}\r\n}\r\n<\/pre>\n<p>\u0641\u0627\u06cc\u0644 \u0631\u0627 \u0628\u0627 \u0641\u0634\u0627\u0631 \u062f\u0627\u062f\u0646 Ctrl+X \u0648 \u0633\u067e\u0633 Y \u0630\u062e\u06cc\u0631\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<p>\u0646\u062d\u0648\u0647 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc Nginx \u0631\u0627 \u062a\u0627\u06cc\u06cc\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo nginx -t\r\n<\/pre>\n<p>\u0633\u0631\u0648\u06cc\u0633 Nginx \u0631\u0627 \u0631\u06cc\u0633\u062a\u0627\u0631\u062a \u06a9\u0646\u06cc\u062f.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo systemctl restart nginx\r\n<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"%db%b9_%d9%86%d8%b5%d8%a8_%da%a9%d8%a7%d9%85%d9%84_%d9%85%d9%88%d8%af%d9%84\"><\/span>\u06f9. \u0646\u0635\u0628 \u06a9\u0627\u0645\u0644 \u0645\u0648\u062f\u0644<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u0622\u062f\u0631\u0633 \u0627\u06cc\u0646\u062a\u0631\u0646\u062a\u06cc https:\/\/moodle.example.com \u0631\u0627 \u062f\u0631 \u0645\u0631\u0648\u0631\u06af\u0631 \u062e\u0648\u062f \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f \u062a\u0627 \u0635\u0641\u062d\u0647 \u062e\u0648\u0634\u0627\u0645\u062f\u06af\u0648\u06cc\u06cc \u0628\u0627\u0632 \u0634\u0648\u062f.<\/p>\n<p>\u0628\u0631\u0627\u06cc \u0627\u062f\u0627\u0645\u0647\u060c \u062f\u06a9\u0645\u0647 Continue \u0631\u0627 \u0641\u0634\u0627\u0631 \u062f\u0647\u06cc\u062f. \u0635\u0641\u062d\u0647 \u0628\u0639\u062f\u060c \u0646\u06cc\u0627\u0632\u0645\u0646\u062f\u06cc\u200c\u0647\u0627\u06cc \u0633\u06cc\u0633\u062a\u0645 \u0631\u0627 \u0628\u0631\u0631\u0633\u06cc \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0627\u06af\u0631 \u0647\u0645\u0647 \u0686\u06cc\u0632 \u062f\u0631\u0633\u062a \u0628\u0648\u062f\u060c \u0628\u0647 \u0635\u0641\u062d\u0647 \u0628\u0639\u062f\u06cc \u0628\u0631\u0648\u06cc\u062f.<\/p>\n<p>\u0635\u0641\u062d\u0647 \u0628\u0639\u062f\u060c \u067e\u0627\u06cc\u06af\u0627\u0647 \u062f\u0627\u062f\u0647 \u0648 \u0641\u0627\u06cc\u0644\u200c\u0647\u0627\u06cc \u0645\u0648\u0631\u062f \u0646\u06cc\u0627\u0632 \u0645\u0648\u062f\u0644 \u0631\u0627 \u062a\u0646\u0638\u06cc\u0645 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0628\u0647 \u0627\u06cc\u062c\u0627\u062f \u062d\u0633\u0627\u0628 \u06a9\u0627\u0631\u0628\u0631\u06cc \u0645\u062f\u06cc\u0631 (administrator ) \u0627\u062f\u0627\u0645\u0647 \u062f\u0647\u06cc\u062f \u0648 \u0633\u0627\u06cc\u0631 \u062c\u0632\u0626\u06cc\u0627\u062a \u0631\u0627 \u062f\u0631 \u0635\u0641\u062d\u0647 \u0628\u0639\u062f \u067e\u0631 \u06a9\u0646\u06cc\u062f.<\/p>\n<p>\u0645\u0631\u062d\u0644\u0647 \u0622\u062e\u0631\u060c \u062a\u0646\u0638\u06cc\u0645 \u0635\u0641\u062d\u0647 \u0627\u0635\u0644\u06cc \u0645\u0648\u062f\u0644 \u0627\u0633\u062a. \u062a\u063a\u06cc\u06cc\u0631\u0627\u062a \u062e\u0648\u062f \u0631\u0627 \u0630\u062e\u06cc\u0631\u0647 \u06a9\u0646\u06cc\u062f \u062a\u0627 \u0628\u0647 \u062f\u0627\u0634\u0628\u0648\u0631\u062f \u0645\u0648\u062f\u0644 \u0628\u0631\u0648\u06cc\u062f. \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0628\u0631\u0646\u0627\u0645\u0647 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u067e\u0644\u062a\u0641\u0631\u0645 \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u062e\u0648\u062f \u0634\u0631\u0648\u0639 \u06a9\u0646\u06cc\u062f.<\/p>\n","protected":false},"excerpt":{"rendered":"Moodle \u06cc\u06a9 \u0633\u06cc\u0633\u062a\u0645 \u0645\u062f\u06cc\u0631\u06cc\u062a \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0622\u0646\u0644\u0627\u06cc\u0646 (LMS) \u0631\u0627\u06cc\u06af\u0627\u0646 \u0648 \u0645\u062a\u0646\u200c\u0628\u0627\u0632 \u0627\u0633\u062a \u06a9\u0647 \u0628\u0647 \u0645\u0631\u0628\u06cc\u0627\u0646 \u0627\u062c\u0627\u0632\u0647 \u0645\u06cc\u200c\u062f\u0647\u062f \u06cc\u06a9 \u0648\u0628\u200c\u0633\u0627\u06cc\u062a&hellip;","protected":false},"author":1,"featured_media":7789,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"csco_singular_sidebar":"","csco_page_header_type":"","csco_page_load_nextpost":"","footnotes":""},"categories":[8,3],"tags":[],"class_list":{"0":"post-7788","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-server","8":"category-linux","9":"cs-entry"},"_links":{"self":[{"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/posts\/7788","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/comments?post=7788"}],"version-history":[{"count":5,"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/posts\/7788\/revisions"}],"predecessor-version":[{"id":7794,"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/posts\/7788\/revisions\/7794"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/media\/7789"}],"wp:attachment":[{"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/media?parent=7788"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/categories?post=7788"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/parsdev.com/blog\/wp-json\/wp\/v2\/tags?post=7788"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}