{"id":305937,"date":"2020-06-25T21:00:49","date_gmt":"2020-06-25T21:00:49","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=305937"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=305937","title":{"rendered":"\u0414\u0435\u043f\u043b\u043e\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 Laravel 7 \u043d\u0430 Ubuntu &amp; Nginx"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/508162\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qq\/dg\/ss\/qqdgss9mmusa0zxhfwnzqajreey.png\" alt=\"Laravel 7 Logo\"><\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0448\u0438\u043b \u044f \u0442\u0443\u0442 \u0441\u0432\u043e\u0451 \u043f\u043e\u0440\u0442\u0444\u043e\u043b\u0438\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 Laravel 7. \u0427\u0442\u043e\u0431\u044b \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0431\u044b\u043b\u0430 \u043b\u0435\u043d\u0434\u0438\u043d\u0433\u043e\u043c, \u0430 \u0432\u0441\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043d\u0430 \u043d\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u0434\u043c\u0438\u043d\u043a\u0438. \u041d\u0435 \u0441\u0443\u0442\u044c. \u0414\u0435\u043b\u043e \u0434\u043e\u0448\u043b\u043e \u0434\u043e \u0434\u0435\u043f\u043b\u043e\u044f. \u041d\u0430\u0448\u0435\u043b \u043f\u0430\u0440\u0443 \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u043e\u0432, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0437\u0430\u043c\u043e\u0440\u043e\u0447\u043a\u0430\u043c\u0438. \u0412 \u0434\u0435\u043f\u043b\u043e\u0435 \u044f \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u0435\u043d, \u044f \u0432\u043e\u043e\u0431\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0444\u0440\u043e\u043d\u0442, \u0447\u0435\u043c \u0444\u0443\u043b\u0441\u0442\u0435\u043a. \u0418, \u0435\u0441\u043b\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u0442\u0435\u0441\u0442\u0438\u0442\u044c \u043d\u0430 PHP \u044f \u0435\u0449\u0435 \u043c\u043e\u0433\u0443, \u0442\u043e \u0434\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0438 \u0442.\u043f. \u044f \u0435\u0449\u0435 \u043d\u0435 \u0434\u043e\u0440\u043e\u0441. \u041d\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u043f\u043e \u0432\u0441\u0435\u043c \u0448\u0430\u0433\u0430\u043c, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 SSH \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u0440\u0430\u0431\u043e\u0447\u0438\u043c \u0441\u0430\u0439\u0442\u043e\u043c. \u041f\u043e\u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u043e\u0431\u043e\u0439\u0442\u0438 \u0432\u0441\u0435 \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0435 \u043a\u0430\u043c\u043d\u0438.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435. \u0412\u0435\u0434\u044c \u044f \u0436\u0435 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432 \u043d\u0430\u0448\u0435\u043b. \u041f\u0440\u0430\u0432\u0434\u0430 \u043d\u0435 \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u043d\u0435 \u0431\u0435\u0437 \u043f\u043e\u043c\u043e\u0449\u0438 StackOverflow \u0438 \u0432\u0440\u044f\u0434 \u043b\u0438 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c. \u042f \u043f\u043e\u043c\u0443\u0447\u0438\u043b\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u0432\u0430\u043c \u0436\u0438\u0437\u043d\u044c \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0414\u0435\u043b\u0430\u0442\u044c \u043c\u044b \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u043c \u0441 \u0434\u0440\u043e\u043f\u043b\u0435\u0442\u043e\u043c \u043d\u0430 DigitalOcean. \u042d\u0442\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0432\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u043b\u044e\u0431\u043e\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433. \u0414\u043e\u0439\u0434\u0435\u0442\u0435 \u0434\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 Ubuntu, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0439\u0442\u0435\u0441\u044c. \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0432\u0441\u0435 \u0436\u0435 \u0440\u0435\u0448\u0438\u043b \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 DigitalOcean, \u0431\u0443\u0434\u0443\u0442 \u0435\u0449\u0435 \u0441\u043e\u0432\u0435\u0442\u044b \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0434\u043e\u043c\u0435\u043d\u0430. \u0410 \u0442\u0430\u043a\u0436\u0435 <a href=\"https:\/\/m.do.co\/c\/825f471c693d\" rel=\"nofollow\">\u0440\u0435\u0444\u0435\u0440\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 100$<\/a>.<\/p>\n<p>  <\/p>\n<blockquote><p>\u0412\u0441\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u043b\u044f DigitalOcean \u0448\u0430\u0433\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u0430\u043d\u044b \u0432 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0441\u043d\u043e\u0441\u043a\u0430\u0445.<\/p><\/blockquote>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">TL;DR (\u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b)<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<h5 id=\"sozdaem-polzovatelya\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h5>\n<p>  <\/p>\n<ul>\n<li><code>ssh root@[IP-\u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u0434\u0440\u043e\u043f\u043b\u0435\u0442\u0430]<\/code><\/li>\n<li><code>adduser laravel<\/code><\/li>\n<li><code>usermod -aG sudo laravel<\/code><\/li>\n<li><code>su laravel<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<h5 id=\"dobavlyaem-emu-ssh\">\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u043c\u0443 SSH<\/h5>\n<p>  <\/p>\n<ul>\n<li><code>mkdir ~\/.ssh<\/code><\/li>\n<li><code>chmod 700 ~\/.ssh<\/code><\/li>\n<li><code>vim ~\/.ssh\/authorized_keys<\/code><\/li>\n<li>\u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447<\/li>\n<li><code>chmod 600 ~\/.ssh\/authorized_keys<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<h5 id=\"faervol\">\u0424\u0430\u0435\u0440\u0432\u043e\u043b<\/h5>\n<p>  <\/p>\n<ul>\n<li><code>sudo ufw allow OpenSSH<\/code><\/li>\n<li><code>sudo ufw enable<\/code><\/li>\n<li><code>sudo ufw status<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<h5 id=\"nginx\">Nginx<\/h5>\n<p>  <\/p>\n<ul>\n<li><code>sudo apt update<\/code><\/li>\n<li><code>sudo apt install -y nginx<\/code><\/li>\n<li><code>sudo ufw allow 'Nginx HTTP'<\/code><\/li>\n<li><code>sudo ufw status<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<h5 id=\"mysql\">MySQL<\/h5>\n<p>  <\/p>\n<ul>\n<li><code>sudo apt install -y mysql-server<\/code><\/li>\n<li><code>sudo mysql_secure_installation<\/code>, <code>NYNNY<\/code><\/li>\n<li><code>sudo mysql<\/code><\/li>\n<li><code>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '&lt;\u0412\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f MySQL&gt;';<\/code><\/li>\n<li><code>SELECT user,authentication_string,plugin,host FROM mysql.user;<\/code><\/li>\n<li><code>FLUSH PRIVILEGES;<\/code><\/li>\n<li><code>exit<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<h5 id=\"php\">PHP<\/h5>\n<p>  <\/p>\n<ul>\n<li>\n<p><code>sudo apt update<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>sudo apt install -y curl wget gnupg2 ca-certificates lsb-release apt-transport-https<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>sudo apt-add-repository ppa:ondrej\/php<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>sudo apt update<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><strong>7.3:<\/strong> <code>sudo apt install -y php7.3-fpm php7.3-mysql<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><strong>7.4:<\/strong> <code>sudo apt install -y php7.4-fpm php7.4-mysql<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>sudo vim \/etc\/nginx\/sites-available\/&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;<\/code><\/p>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430:<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">server {         listen 80;         root \/var\/www\/html;         index index.php index.html index.htm index.nginx-debian.html;         server_name &lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d \u0438\u043b\u0438 IP&gt;;          location \/ {                 try_files $uri $uri\/ =404;         }          location ~ \\.php$ {                 include snippets\/fastcgi-php.conf;                 fastcgi_pass unix:\/var\/run\/php\/php7.4-fpm.sock;         }          location ~ \/\\.ht {                 deny all;         } }<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u0422\u043e\u043b\u044c\u043a\u043e HTTP \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0434 Laravel:<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">server {     listen 80;     listen [::]:80;      root \/var\/www\/html\/&lt;\u0418\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430&gt;\/public;     index index.php index.html index.htm index.nginx-debian.html;      server_name &lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d \u0438\u043b\u0438 IP&gt;;      location \/ {         try_files $uri $uri\/ \/index.php?$query_string;     }      location ~ \\.php$ {         include snippets\/fastcgi-php.conf;         fastcgi_pass unix:\/var\/run\/php\/php7.4-fpm.sock;     }      location ~ \/\\.ht {         deny all;     } }<\/code><\/pre>\n<p>  <\/p>\n<p><strong>HTTPS \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0434 Laravel:<\/strong><\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">server {     listen 80;     listen [::]:80;      server_name &lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt; www.&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;;     return 301 https:\/\/$server_name$request_uri; }  server {     listen 443 ssl http2;     listen [::]:443 ssl http2;     server_name &lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt; www.&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;;     root \/var\/www\/html\/&lt;\u0418\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430&gt;\/public;      ssl_certificate \/etc\/letsencrypt\/live\/&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;\/fullchain.pem;     ssl_certificate_key \/etc\/letsencrypt\/live\/&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;\/privkey.pem;      ssl_protocols TLSv1.2;     ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384;     ssl_prefer_server_ciphers on;      add_header X-Frame-Options &quot;SAMEORIGIN&quot;;     add_header X-XSS-Protection &quot;1; mode=block&quot;;     add_header X-Content-Type-Options &quot;nosniff&quot;;      index index.php index.html index.htm index.nginx-debian.html;      charset utf-8;      location \/ {             try_files $uri $uri\/ \/index.php?$query_string;     }      location ~ \\.php$ {         include snippets\/fastcgi-php.conf;         fastcgi_pass unix:\/var\/run\/php\/php7.4-fpm.sock;     }      location ~ \/\\.ht {             deny all;     }      location ~ \/.well-known {             allow all;     } }<\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li><code>sudo ln -s \/etc\/nginx\/sites-available\/&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt; \/etc\/nginx\/sites-enabled\/<\/code><\/li>\n<li><code>sudo unlink \/etc\/nginx\/sites-enabled\/default<\/code><\/li>\n<li><code>sudo nginx -t<\/code><\/li>\n<li><code>sudo systemctl reload nginx<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<h5 id=\"laravel\">Laravel<\/h5>\n<p>  <\/p>\n<ul>\n<li>\n<p><strong>7.3:<\/strong> <code>sudo apt install -y php7.3-mbstring php7.3-xml composer unzip<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><strong>7.4:<\/strong> <code>sudo apt install -y php7.4-mbstring php7.4-xml composer unzip<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>mysql -u root -p<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>CREATE DATABASE laravel DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>GRANT ALL ON laravel.* TO 'root'@'localhost' IDENTIFIED BY '&lt;\u0412\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 MySQL&gt;';<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>FLUSH PRIVILEGES;<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>exit<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>cd \/var\/www\/html<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>sudo mkdir -p &lt;\u0418\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430&gt;<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>sudo chown laravel:laravel &lt;\u0418\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430&gt;<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>cd .\/&lt;\u0418\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430&gt;<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>git clone &lt;\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442&gt; .<\/code> \/ <code>git clone -b &lt;\u0438\u043c\u044f \u0432\u0435\u0442\u043a\u0438&gt; --single-branch &lt;\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442&gt; .<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>composer install<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>vim .env<\/code><\/p>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"plaintext\">APP_NAME=Laravel APP_ENV=production APP_KEY= APP_DEBUG=false APP_URL=http:\/\/&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;  LOG_CHANNEL=stack  DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel DB_USERNAME=root DB_PASSWORD=&lt;\u0412\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 MySQL&gt;<\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li>\n<p><code>php artisan migrate<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>php artisan key:generate<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>sudo chown -R $USER:www-data storage<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>sudo chown -R $USER:www-data bootstrap\/cache<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>chmod -R 775 storage<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>chmod -R 775 bootstrap\/cache<\/code><\/p>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<h5 id=\"https\">HTTPS<\/h5>\n<p>  <\/p>\n<ul>\n<li>\n<p><code>sudo add-apt-repository ppa:certbot\/certbot<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>sudo apt install -y python-certbot-nginx<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>sudo certbot certonly --webroot --webroot-path=\/var\/www\/html\/&lt;\u0418\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430&gt;\/public -d &lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt; -d www.&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>sudo nginx -t<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>sudo ufw allow 'Nginx HTTPS'<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>sudo ufw status<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>sudo systemctl reload nginx<\/code><\/p>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<hr>\n<\/div><\/div>\n<p>  <\/p>\n<h3 id=\"sozdaem-droplet-na-digitalocean-i-registriruem-novyy-ssh-klyuch\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u0440\u043e\u043f\u043b\u0435\u0442 \u043d\u0430 DigitalOcean \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043d\u043e\u0432\u044b\u0439 SSH-\u043a\u043b\u044e\u0447<\/h3>\n<p>  <\/p>\n<blockquote><p>\u042f \u0438\u0441\u043a\u0440\u0435\u043d\u043d\u0435 \u0432\u0435\u0440\u044e, \u0447\u0442\u043e \u0432\u044b \u0441\u0430\u043c\u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u0442\u0435\u0441\u044c \u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0435\u0439 \u043d\u0430 DigitalOcean. \u041e\u043d\u0430 \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u0430\u044f, \u0441 \u043a\u0443\u0447\u0435\u0439 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0439 \u0438 \u043f\u0440\u043e\u0447\u0435\u0439 \u0431\u0430\u0439\u0434\u044b. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043f\u0440\u0438 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u0441\u0435\u0442\u0438, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0432\u0441\u0451 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 VPN, \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043c\u043e\u0447\u044c.<\/p>\n<p>  \u0412 \u043c\u0435\u043d\u044e \u0441\u0432\u0435\u0440\u0445\u0443 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c <strong>Create<\/strong>-&gt;<strong>Droplets<\/strong>. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c <strong>Ubuntu<\/strong>.<\/p>\n<p>  \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c, \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 100$ \u043d\u0430 \u0441\u0447\u0435\u0442. \u041d\u043e \u043d\u0435 \u043e\u0431\u043e\u043b\u044c\u0449\u0430\u0439\u0442\u0435\u0441\u044c. \u0423 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u0441\u0435\u0433\u043e 60 \u0434\u043d\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u0438\u0445 \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0442\u044c. \u0410 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u043e. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435, \u043a\u0430\u043a \u0438 \u044f, \u0437\u0430\u0445\u043e\u0442\u0435\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u043d \u043f\u043e\u0434\u043e\u0440\u043e\u0436\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u0443\u0436\u0435 \u043f\u043e\u0439\u0434\u0443\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0435\u043d\u044c\u0433\u0438, \u043f\u0435\u0440\u0435\u0441\u0435\u0441\u0442\u044c \u043d\u0430 \u043f\u043e\u0434\u0435\u0448\u0435\u0432\u043b\u0435. \u0421\u0440\u0430\u0437\u0443 \u0433\u043e\u0432\u043e\u0440\u044e, \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f. \u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e, \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f. \u0422\u0430\u043a\u0438\u0435 \u0434\u0435\u043b\u0430. \u042f \u0432\u044b\u0431\u0438\u0440\u0430\u044e <strong>Standard<\/strong>-&gt;<strong>$5<\/strong>.<\/p>\n<p>  \u0420\u0435\u0433\u0438\u043e\u043d \u044f \u0432\u044b\u0431\u0438\u0440\u0430\u044e \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0439 \u043a \u043d\u0430\u043c <strong>Frankfurt<\/strong>. <strong>VPC Network<\/strong>-&gt;<strong>default-fra1<\/strong><\/p>\n<p>  \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0441\u0440\u0430\u0437\u0443 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0447\u0435\u0440\u0435\u0437 SSH. \u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c <strong>New SSH Key<\/strong>. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435\u0442 SSH, \u0441\u043f\u0440\u0430\u0432\u0430 \u0435\u0441\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c bash-\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c <code>ssh-keygen<\/code>. \u041f\u043e\u0442\u043e\u043c \u0437\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0444\u0430\u0439\u043b \u0441 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c <code>\/Users\/&lt;\u0412\u0430\u0448\u0435 \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f&gt;\/.ssh\/id_rsa.pub<\/code> (\u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e <code>cat ~\/.ssh\/id_rsa.pub<\/code>), \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043e\u043a\u043d\u043e \u0441\u043b\u0435\u0432\u0430. \u0418\u043c\u044f \u043b\u044e\u0431\u043e\u0435.<\/p>\n<p>  \u041f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0435\u043c \u0434\u043b\u044f \u0434\u0440\u043e\u043f\u043b\u0435\u0442\u0430 \u0445\u043e\u0441\u0442\u043d\u0435\u0439\u043c.<\/p>\n<p>  \u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c <strong>Create Droplet<\/strong><\/p><\/blockquote>\n<p>  <\/p>\n<h3 id=\"sozdaem-novogo-polzovatelya\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h3>\n<p>  <\/p>\n<ul>\n<li><code>ssh root@[IP-\u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u0434\u0440\u043e\u043f\u043b\u0435\u0442\u0430]<\/code><\/li>\n<li>Are you sure you want to continue connecting (yes\/no\/[fingerprint])? <code>yes<\/code><\/li>\n<li>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0432\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 SSH<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <strong>laravel<\/strong>: <code>adduser laravel<\/code><\/li>\n<li>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c \u0438 \u0434\u0440\u0443\u0433\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e (\u044f \u0432\u0432\u043e\u0436\u0443 \u0442\u043e\u043b\u044c\u043a\u043e Full Name)<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 sudo: <code>usermod -aG sudo laravel<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<h3 id=\"ssh-dlya-novogo-polzovatelya\">SSH \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/h3>\n<p>  <\/p>\n<ul>\n<li>\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f: <code>su laravel<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u0412\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0434\u0430\u043b\u0435\u0435, \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u0441\u0442\u0430\u0442\u044c\u0438, \u043c\u044b \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f laravel. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u0434\u0440\u0443\u0433 \u043f\u0440\u0435\u0440\u0432\u0430\u043b\u0438\u0441\u044c, \u043f\u0435\u0440\u0435\u0437\u0430\u0439\u0434\u0438\u0442\u0435 \u0438 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 <code>su laravel<\/code><\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li><code>mkdir ~\/.ssh<\/code><\/li>\n<li><code>chmod 700 ~\/.ssh<\/code><\/li>\n<li><code>vim ~\/.ssh\/authorized_keys<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p><em>\u041c\u044b \u043e\u0442\u043a\u0440\u044b\u043b\u0438 \u0444\u0430\u0439\u043b \u0432 Vim. \u0415\u0441\u043b\u0438 \u0432\u044b \u0441 \u043d\u0438\u043c \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0432\u043e\u043e\u0431\u0449\u0435, \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 Nano, \u0432\u0430\u0448\u0435 \u043f\u0440\u0430\u0432\u043e<\/em>.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u0430\u043c\u044b\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Vim<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e \u0445\u043e\u0434\u0443 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u043c Vim, \u0432\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435.<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0412 Vim \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0435\u0436\u0438\u043c\u044b: \u043e\u0431\u044b\u0447\u043d\u044b\u0439 (Normal mode), \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u044b \u0432\u0432\u043e\u0434\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0435 \u0440\u0435\u0436\u0438\u043c\u044b \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435.<\/li>\n<li>\u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0439\u0442\u0438 \u0438\u0437 \u043b\u044e\u0431\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430 \u0438 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0432 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0430\u0436\u0430\u0442\u044c <strong><code>Esc<\/code><\/strong><\/li>\n<li>\u041f\u0435\u0440\u0435\u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f: \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0440\u0435\u043b\u043a\u0430\u043c\u0438<\/li>\n<li>\u0412\u044b\u0439\u0442\u0438 \u0431\u0435\u0437 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f <code>&lt;Normal mode&gt;<\/code>: <strong><code>:q!<\/code><\/strong><\/li>\n<li>\u0412\u044b\u0439\u0442\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c <code>&lt;Normal mode&gt;<\/code>: <strong><code>:wq<\/code><\/strong><\/li>\n<li>\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u0440\u0435\u0436\u0438\u043c \u0432\u0432\u043e\u0434\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 <code>&lt;Normal mode&gt;<\/code>: <strong><code>i<\/code><\/strong> (\u043e\u0442 \u0430\u043d\u0433\u043b. <em>insert<\/em>)<\/li>\n<\/ul>\n<p>  <\/p>\n<hr>\n<\/div><\/div>\n<p>  <\/p>\n<ul>\n<li>\u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0448 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u0432\u044b\u0448\u0435)<\/li>\n<li>\u0417\u0430\u0449\u0438\u0449\u0430\u0435\u043c \u043e\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439: <code>chmod 600 ~\/.ssh\/authorized_keys<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<h3 id=\"ustanavlivaem-faervol\">\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0444\u0430\u0435\u0440\u0432\u043e\u043b<\/h3>\n<p>  <\/p>\n<ul>\n<li>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438: <code>sudo ufw app list<\/code><\/li>\n<li>\u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c OpenSSH (\u0438\u043d\u0430\u0447\u0435 \u043d\u0430\u0441 \u0437\u0430\u043b\u043e\u0447\u0438\u0442): <code>sudo ufw allow OpenSSH<\/code><\/li>\n<li>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0444\u0430\u0435\u0440\u0432\u043e\u043b: <code>sudo ufw enable<\/code>, <code>y<\/code><\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c: <code>sudo ufw status<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"plaintext\">Status: active  To                         Action      From --                         ------      ---- OpenSSH                    ALLOW       Anywhere OpenSSH (v6)               ALLOW       Anywhere (v6)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435.<\/p>\n<p>  <\/p>\n<h3 id=\"ustanavlivaem-nginx\">\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Nginx<\/h3>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u0432\u0430\u0441 \u0438\u043d\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c &quot;\u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b?&quot;. \u041e\u0442\u0432\u0435\u0447\u0430\u0439\u0442\u0435 <code>y<\/code> (\u043d\u0443 \u0442\u043e\u043b\u044c\u043a\u043e, \u0435\u0441\u043b\u0438 \u0443\u0432\u0435\u0440\u0435\u043d\u044b).<\/p>\n<p>  <\/p>\n<ul>\n<li><code>sudo apt update<\/code><\/li>\n<li><code>sudo apt install nginx<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c Nginx \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u0430<\/p>\n<p>  <\/p>\n<ul>\n<li><code>sudo ufw app list<\/code><\/li>\n<li><code>sudo ufw allow 'Nginx HTTP'<\/code><\/li>\n<li><code>sudo ufw status<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"plaintext\">Status: active  To                         Action      From --                         ------      ---- OpenSSH                    ALLOW       Anywhere Nginx HTTP                 ALLOW       Anywhere OpenSSH (v6)               ALLOW       Anywhere (v6) Nginx HTTP (v6)            ALLOW       Anywhere (v6)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043f\u043e \u0432\u0430\u0448\u0435\u043c\u0443 IP. \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u0438\u0434\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u043e, \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/lw\/qs\/6n\/lwqs6n32zmpxjkmpx-ccwnia3sq.png\" alt=\"Welcome to nginx\"><\/p>\n<p>  <\/p>\n<h3 id=\"ustanavlivaem-mysql\">\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c MySQL<\/h3>\n<p>  <\/p>\n<ul>\n<li><code>sudo apt install mysql-server<\/code><\/li>\n<li>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u043e \u0437\u0430\u0449\u0438\u0442\u0435 <code>sudo mysql_secure_installation<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041e\u0442\u0432\u0435\u0442\u044c\u0442\u0435 \u043d\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c, \u0432\u043e\u0442 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b:<\/p>\n<p>  <\/p>\n<ul>\n<li>\n<p>Validate password plugin \u2014 <code>N<\/code><\/p>\n<p>  <\/li>\n<li>\n<p>Remove anonymous users? \u2014 <code>Y<\/code><\/p>\n<p>  <\/li>\n<li>\n<p>Disallow root login remotely? \u2014 <code>N<\/code><\/p>\n<p>  <\/li>\n<li>\n<p>Remove test database and access to it? \u2014 <code>N<\/code><\/p>\n<p>  <\/li>\n<li>\n<p>Reload privilege tables now? \u2014 <code>Y<\/code><\/p>\n<p>  <\/li>\n<li>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 MySQL: <code>sudo mysql<\/code><\/p>\n<p>  <\/li>\n<li>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u0430: <code>SELECT user,authentication_string,plugin,host FROM mysql.user;<\/code><\/p>\n<p>  <\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f root: <code>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '&lt;\u0412\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f MySQL&gt;';<\/code><\/p>\n<p>  <\/li>\n<li>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0441\u043d\u043e\u0432\u0430: <code>SELECT user,authentication_string,plugin,host FROM mysql.user;<\/code><\/p>\n<p>  <\/li>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 MySQL: <code>FLUSH PRIVILEGES;<\/code> \u0438 <code>exit<\/code><\/p>\n<p>  <\/li>\n<li>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0439\u0442\u0438 \u0432 MySQL \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>mysql -u root -p<\/code> \u0438 \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c<\/p>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<h3 id=\"ustanavlivaem-php\">\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c PHP<\/h3>\n<p>  <\/p>\n<p>\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c \u043e\u0442 <a href=\"https:\/\/launchpad.net\/~ondrej\/+archive\/ubuntu\/php\/\" rel=\"nofollow\">Ond\u0159ej Sur\u00fd<\/a><\/p>\n<p>  <\/p>\n<ul>\n<li><code>sudo apt update<\/code><\/li>\n<li><code>sudo apt install -y curl wget gnupg2 ca-certificates lsb-release apt-transport-https<\/code><\/li>\n<li><code>sudo apt-add-repository ppa:ondrej\/php<\/code><\/li>\n<li><code>sudo apt update<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c. \u0414\u043b\u044f Laravel 7 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c PHP 7.3 \u0438\u043b\u0438 7.4. \u041e\u0442\u043b\u0438\u0447\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u044c \u0432 \u0446\u0438\u0444\u0440\u0430\u0445 3 \u0438 4.<\/p>\n<p>  <\/p>\n<ul>\n<li>7.3: <code>sudo apt install -y php7.3-fpm php7.3-mysql<\/code><\/li>\n<li>7.4: <code>sudo apt install -y php7.4-fpm php7.4-mysql<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p>PHP FastCGI Process Manager (fpm) \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 PHP \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438. mysql, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 MySQL.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u044f \u0432\u0441\u0435 \u0431\u0443\u0434\u0443 \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 7.4.<\/p>\n<p>  <\/p>\n<h3 id=\"nastraivaem-nginx\">\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c Nginx<\/h3>\n<p>  <\/p>\n<ul>\n<li><code>sudo vim \/etc\/nginx\/sites-available\/&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e &quot;&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;&quot; \u0432\u043f\u0438\u0448\u0438\u0442\u0435 \u0434\u043e\u043c\u0435\u043d (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>mysite.ru<\/code>), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u043a\u0430 \u043d\u0435\u0442, \u043f\u0438\u0448\u0438\u0442\u0435 \u043b\u044e\u0431\u043e\u0439, \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432 \u044d\u0442\u043e\u0439 \u0433\u043b\u0430\u0432\u0435 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0435\u0433\u043e.<\/p>\n<p>  <\/p>\n<p>\u0412\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">server {         listen 80;         root \/var\/www\/html;         index index.php index.html index.htm index.nginx-debian.html;         server_name &lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d \u0438\u043b\u0438 IP&gt;;          location \/ {                 try_files $uri $uri\/ =404;         }          location ~ \\.php$ {                 include snippets\/fastcgi-php.conf;                 fastcgi_pass unix:\/var\/run\/php\/php7.4-fpm.sock;         }          location ~ \/\\.ht {                 deny all;         } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0412\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044e 7.3 \u0432\u043c\u0435\u0441\u0442\u043e <code>php7.4-fpm.sock<\/code> \u0432\u043f\u0438\u0448\u0438\u0442\u0435 <code>php7.4-fpm.sock<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0421\u043b\u0443\u0448\u0430\u0435\u043c 80 \u043f\u043e\u0440\u0442 \u043d\u0430 <code>server_name<\/code>, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u043a\u043e\u0440\u043d\u0435 <code>\/var\/www\/html<\/code> \u0431\u0435\u0440\u0435\u043c index-\u0444\u0430\u0439\u043b. \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 <code>server_name<\/code> \u0447\u0442\u043e-\u0442\u043e \u0435\u0441\u0442\u044c, \u0438\u0449\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u0444\u0430\u0439\u043b. \u041d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u043c, \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u043c 404. \u0415\u0441\u043b\u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 <code>.php<\/code>, \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0435\u043c \u0447\u0435\u0440\u0435\u0437 <code>fpm<\/code>. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c <code>.ht<\/code>, \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u043c (403).<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0414\u0435\u043b\u0430\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u0438\u0437 <code>sites-available<\/code> \u0432 <code>sites-enabled<\/code>: <code>sudo ln -s \/etc\/nginx\/sites-available\/&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt; \/etc\/nginx\/sites-enabled\/<\/code><\/li>\n<li>\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 <code>default<\/code>: <code>sudo unlink \/etc\/nginx\/sites-enabled\/default<\/code><\/li>\n<li>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438: <code>sudo nginx -t<\/code><\/li>\n<li>\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c: <code>sudo systemctl reload nginx<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>sudo vim \/var\/www\/html\/info.php<\/code><\/li>\n<li>\u041f\u0438\u0448\u0435\u043c: <code>&lt;?php phpinfo();<\/code><\/li>\n<li>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 <code>&lt;\u0412\u0430\u0448 IP&gt;\/info.php<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gk\/vu\/jz\/gkvujz-nixkxy3vzyhdouifpmpq.png\" alt=\"PHP Info\"><\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c: <code>sudo rm \/var\/www\/html\/info.php<\/code><\/p>\n<p>  <\/p>\n<h3 id=\"stavim-laravel\">\u0421\u0442\u0430\u0432\u0438\u043c Laravel<\/h3>\n<p>  <\/p>\n<ul>\n<li>\n<p>7.3: <code>sudo apt install php7.3-mbstring php7.3-xml composer unzip<\/code><\/p>\n<p>  <\/li>\n<li>\n<p>7.4: <code>sudo apt install php7.4-mbstring php7.4-xml composer unzip<\/code><\/p>\n<p>  <\/li>\n<li>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 MySQL: <code>mysql -u root -p<\/code><\/p>\n<p>  <\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0411\u0414 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <strong>laravel<\/strong>: <code>CREATE DATABASE laravel DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;<\/code><\/p>\n<p>  <\/li>\n<li>\n<p>\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c root \u0434\u043e\u0441\u0442\u0443\u043f \u043a <strong>laravel<\/strong>: <code>GRANT ALL ON laravel.* TO 'root'@'localhost' IDENTIFIED BY '&lt;\u0412\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 MySQL&gt;';<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>FLUSH PRIVILEGES;<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>exit<\/code><\/p>\n<p>  <\/li>\n<li>\n<p><code>cd \/var\/www\/html<\/code><\/p>\n<p>  <\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430: <code>sudo mkdir -p &lt;\u0418\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430&gt;<\/code><\/p>\n<p>  <\/li>\n<li>\n<p>\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e <strong>laravel<\/strong> \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442: <code>sudo chown laravel:laravel &lt;\u0418\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430&gt;<\/code><\/p>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441 Github.<\/p>\n<p>  <\/p>\n<ul>\n<li><code>cd .\/&lt;\u0418\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430&gt;<\/code><\/li>\n<li><code>git clone &lt;\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442&gt; .<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0421\u0442\u043e\u0438\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u043b\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0430\u0439\u043b\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437 <code>\/public<\/code>) \u043d\u0430 Github, \u0442\u043e \u0438\u0445 \u0443 \u0432\u0430\u0441, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u042f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0442\u043a\u0443 <code>deploy<\/code>, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443\u0436\u0435 \u0438 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043b: <code>git clone -b &lt;\u0438\u043c\u044f \u0432\u0435\u0442\u043a\u0438&gt; --single-branch &lt;\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442&gt; .<\/code>.<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438: <code>composer install<\/code><\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0435\u043c .env: <code>vim .env<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044e \u0435\u0433\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">APP_NAME=Laravel APP_ENV=production APP_KEY= APP_DEBUG=false APP_URL=http:\/\/&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;  LOG_CHANNEL=stack  DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel DB_USERNAME=root DB_PASSWORD=&lt;\u0412\u0430\u0448 \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442 MySQL&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0435 \u0441\u0432\u043e\u0439 .env, \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 APP_ENV \u043d\u0430 production, APP_DEBUG \u043d\u0430 false \u0438 \u0432\u043f\u0438\u0448\u0438\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f MySQL.<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041c\u0438\u0433\u0440\u0438\u0440\u0443\u0435\u043c \u0411\u0414: <code>php artisan migrate<\/code><\/li>\n<li>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u0434: <code>php artisan key:generate<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041c\u0435\u043d\u044f\u0435\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>sudo chown -R $USER:www-data storage<\/code><\/li>\n<li><code>sudo chown -R $USER:www-data bootstrap\/cache<\/code><\/li>\n<li><code>chmod -R 775 storage<\/code><\/li>\n<li><code>chmod -R 775 bootstrap\/cache<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435, \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c, \u2013 \u043f\u0435\u0440\u0435\u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Nginx \u043f\u043e\u0434 Laravel:<\/p>\n<p>  <\/p>\n<p><code>sudo vim \/etc\/nginx\/sites-available\/&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">server {     listen 80;     listen [::]:80;      root \/var\/www\/html\/&lt;\u0418\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430&gt;\/public;     index index.php index.html index.htm index.nginx-debian.html;      server_name &lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d \u0438\u043b\u0438 IP&gt;;      location \/ {         try_files $uri $uri\/ \/index.php?$query_string;     }      location ~ \\.php$ {         include snippets\/fastcgi-php.conf;         fastcgi_pass unix:\/var\/run\/php\/php7.4-fpm.sock;     }      location ~ \/\\.ht {         deny all;     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437, \u0435\u0441\u043b\u0438 \u0412\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044e 7.3 \u0432\u043c\u0435\u0441\u0442\u043e <code>php7.4-fpm.sock<\/code> \u0432\u043f\u0438\u0448\u0438\u0442\u0435 <code>php7.4-fpm.sock<\/code>.<\/p>\n<p>  <\/p>\n<h3 id=\"nastroyka-domena-na-digitalocean\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0434\u043e\u043c\u0435\u043d\u0430 \u043d\u0430 DigitalOcean<\/h3>\n<p>  <\/p>\n<blockquote><p>\u0412\u0441\u0451, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e. \u0412\u044b \u043f\u043e\u043a\u0443\u043f\u0430\u0435\u0442\u0435 \u0434\u043e\u043c\u0435\u043d (\u0433\u0434\u0435 \u0443\u0433\u043e\u0434\u043d\u043e), \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u0435 \u043d\u0430 DigitalOcean \u0432 <strong>Create<\/strong>-&gt;<strong>Domains\/DNS<\/strong>. \u0412 \u043f\u043e\u043b\u0435 <strong>Add a domain<\/strong> \u0432\u044b \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0435 \u044d\u0442\u043e\u0442 \u0434\u043e\u043c\u0435\u043d, \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c. \u0417\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u0435 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043e\u043c\u0435\u043d\u0430 \u0438 \u0432 \u043f\u043e\u043b\u0435 <strong>HOSTNAME<\/strong> \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0435 <strong>@<\/strong>. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442\u0435 <strong>Create record<\/strong>.<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u0435 \u043d\u0430 \u0441\u0430\u0439\u0442, \u0433\u0434\u0435 \u043f\u043e\u043a\u0443\u043f\u0430\u043b\u0438 \u0434\u043e\u043c\u0435\u043d, \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0435 \u0442\u0430\u043c &quot;DNS \u0421\u0435\u0440\u0432\u0435\u0440\u044b&quot; (\u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435) \u0438 \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b DigitalOcean (\u0430 \u0438\u043c\u0435\u043d\u043d\u043e <code>ns1.digitalocean.com<\/code>, <code>ns2.digitalocean.com<\/code>, <code>ns3.digitalocean.com<\/code>). \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0434\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e (\u0438\u043b\u0438 \u043c\u043d\u043e\u0433\u043e) \u043f\u043e\u0434\u043e\u0436\u0434\u0430\u0442\u044c, \u043f\u043e\u043a\u0430 \u044d\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044b. \u0413\u043e\u0442\u043e\u0432\u043e!<br \/>  \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u2013 \u0443 \u0432\u0430\u0441 \u0441\u0430\u0439\u0442 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043a HTTP. \u0427\u0442\u043e\u0431\u044b \u0431\u044b\u043b HTTPS, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438.<\/p><\/blockquote>\n<p>  <\/p>\n<h3 id=\"nastroivaem-https\">\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0432\u0430\u0435\u043c HTTPS<\/h3>\n<p>  <\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c certbot \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0435\u043c\u0443 \u0438\u043c\u044f \u0434\u043e\u043c\u0435\u043d\u0430 (\u0444\u043e\u0440\u043c\u0430\u0442\u0430 <code>mysite.ru<\/code>) \u0438 \u0438\u043c\u044f \u0434\u043e\u043c\u0435\u043d\u0430 \u0441 www (<code>www.mysite.ru<\/code>).<\/p>\n<p>  <\/p>\n<ul>\n<li><code>sudo add-apt-repository ppa:certbot\/certbot<\/code><\/li>\n<li><code>sudo apt install python-certbot-nginx<\/code><\/li>\n<li><code>sudo certbot certonly --webroot --webroot-path=\/var\/www\/html\/&lt;\u0418\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430&gt;\/public -d &lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt; -d www.&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Nginx (\u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f):<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">server {     listen 80;     listen [::]:80;      server_name &lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt; www.&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;;     return 301 https:\/\/$server_name$request_uri; }  server {     listen 443 ssl http2;     listen [::]:443 ssl http2;     server_name &lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt; www.&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;;     root \/var\/www\/html\/&lt;\u0418\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430&gt;\/public;      ssl_certificate \/etc\/letsencrypt\/live\/&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;\/fullchain.pem;     ssl_certificate_key \/etc\/letsencrypt\/live\/&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;\/privkey.pem;      ssl_protocols TLSv1.2;     ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384;     ssl_prefer_server_ciphers on;      add_header X-Frame-Options &quot;SAMEORIGIN&quot;;     add_header X-XSS-Protection &quot;1; mode=block&quot;;     add_header X-Content-Type-Options &quot;nosniff&quot;;      index index.php index.html index.htm index.nginx-debian.html;      charset utf-8;      location \/ {             try_files $uri $uri\/ \/index.php?$query_string;     }      location ~ \\.php$ {         include snippets\/fastcgi-php.conf;         fastcgi_pass unix:\/var\/run\/php\/php7.4-fpm.sock;     }      location ~ \/\\.ht {             deny all;     }      location ~ \/.well-known {             allow all;     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0443\u043c\u0430\u044e, \u0432\u044b \u0443\u0436\u0435 \u043f\u043e\u043d\u044f\u043b\u0438, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0434\u043b\u044f PHP 7.3.<\/p>\n<p>  <\/p>\n<p>\u0422\u0443\u0442, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e. \u041c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 HTTP (\u043f\u043e\u0440\u0442 80) \u043d\u0430 HTTPS (\u043f\u043e\u0440\u0442 443). \u0410 \u0442\u0430\u043c \u0434\u0435\u043b\u0430\u0435\u043c \u0432\u0441\u0435 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u0440\u0430\u043d\u044c\u0448\u0435, \u043d\u043e \u0443\u0436\u0435 \u0441 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<p>  <\/p>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0435\u0440\u0432\u043e\u043b\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>sudo nginx -t<\/code><\/li>\n<li><code>sudo ufw app list<\/code><\/li>\n<li><code>sudo ufw allow 'Nginx HTTPS'<\/code><\/li>\n<li><code>sudo ufw status<\/code><\/li>\n<li><code>sudo systemctl reload nginx<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0434\u043e.<\/p>\n<p>  <\/p>\n<h3 id=\"dopolnitelno-ustanovka-nodejs\">[\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e] \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Node.js<\/h3>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c npm-\u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u0440\u044f\u043c\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Node.js.<\/p>\n<p>  <\/p>\n<ul>\n<li><code>sudo apt update<\/code><\/li>\n<li><code>sudo apt install -y nodejs npm<\/code><\/li>\n<li><code>nodejs -v<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0412\u0441\u0451, \u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u0435\u043d\u044f \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044f \u043f\u0435\u0440\u0435\u0439\u0434\u0443 \u0441 DigitalOcean \u043a\u0443\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043e\u0431\u043b\u0438\u0436\u0435 \u043a \u0420\u043e\u0441\u0441\u0438\u0438 \u0438 \u043f\u043e\u0434\u0435\u0448\u0435\u0432\u043b\u0435. \u041d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u044f \u0443\u0436\u0435 \u043f\u0440\u043e\u0448\u0435\u043b \u0432\u0441\u0435 \u043a\u0440\u0443\u0433\u0438 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0438 \u0432\u0441\u0451 \u0434\u0435\u043b\u0430\u043b \u0442\u0430\u043c, \u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043d\u0430 \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0435. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0438\u0445 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u044b\u0435 100 \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432 \u2013 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u043f\u043b\u0430\u0446\u0434\u0430\u0440\u043c \u0434\u043b\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u043a.<\/p>\n<p>  <\/p>\n<p>P.S. \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u043e\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0443 <a href=\"https:\/\/gist.github.com\/vicgonvt\/cd0431a5cdc043ebab7f4954f7b4d471\" rel=\"nofollow\">\u0432\u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0433\u0438\u0441\u0442\u0430<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u043b \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0432\u0441\u0435\u0445 \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u041e\u043d \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u0445 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043b\u044f Laravel 7, \u044f \u044d\u0442\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u043b.<\/p>\n<p>  <\/p>\n<p>P.P.S. \u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u0434\u0440\u0443\u0433 \u0442\u043e\u043f\u043e\u0432\u044b\u0439 \u0438\u043d\u0436\u0435\u043d\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0443\u043c\u0430\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 \u0438\u0437 bash, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043d\u0435 \u0441\u0443\u0434\u0438\u0442\u0435 \u0441\u0442\u0440\u043e\u0433\u043e. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u0430\u043c \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0438\u0437\u043a\u043e\u0432\u0430\u0442\u044b\u043c, \u043d\u043e \u044f \u0431\u044b\u043b \u0431\u044b \u0440\u0430\u0434 \u043d\u0430\u0439\u0442\u0438 \u0442\u0430\u043a\u0443\u044e, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0430 \u043c\u043d\u0435 \u0431\u044b\u043b\u0430 \u043d\u0443\u0436\u043d\u0430. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e, \u044f \u043e\u0431\u0435\u0438\u043c\u0438 \u0440\u0443\u043a\u0430\u043c\u0438 &quot;\u0437\u0430&quot;.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/508162\/\"> https:\/\/habr.com\/ru\/post\/508162\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/508162\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qq\/dg\/ss\/qqdgss9mmusa0zxhfwnzqajreey.png\" alt=\"Laravel 7 Logo\"><\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0448\u0438\u043b \u044f \u0442\u0443\u0442 \u0441\u0432\u043e\u0451 \u043f\u043e\u0440\u0442\u0444\u043e\u043b\u0438\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 Laravel 7. \u0427\u0442\u043e\u0431\u044b \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0431\u044b\u043b\u0430 \u043b\u0435\u043d\u0434\u0438\u043d\u0433\u043e\u043c, \u0430 \u0432\u0441\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043d\u0430 \u043d\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u0434\u043c\u0438\u043d\u043a\u0438. \u041d\u0435 \u0441\u0443\u0442\u044c. \u0414\u0435\u043b\u043e \u0434\u043e\u0448\u043b\u043e \u0434\u043e \u0434\u0435\u043f\u043b\u043e\u044f. \u041d\u0430\u0448\u0435\u043b \u043f\u0430\u0440\u0443 \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u043e\u0432, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0437\u0430\u043c\u043e\u0440\u043e\u0447\u043a\u0430\u043c\u0438. \u0412 \u0434\u0435\u043f\u043b\u043e\u0435 \u044f \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u0435\u043d, \u044f \u0432\u043e\u043e\u0431\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0444\u0440\u043e\u043d\u0442, \u0447\u0435\u043c \u0444\u0443\u043b\u0441\u0442\u0435\u043a. \u0418, \u0435\u0441\u043b\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u0442\u0435\u0441\u0442\u0438\u0442\u044c \u043d\u0430 PHP \u044f \u0435\u0449\u0435 \u043c\u043e\u0433\u0443, \u0442\u043e \u0434\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0438 \u0442.\u043f. \u044f \u0435\u0449\u0435 \u043d\u0435 \u0434\u043e\u0440\u043e\u0441. \u041d\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u043f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u043f\u043e \u0432\u0441\u0435\u043c \u0448\u0430\u0433\u0430\u043c, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 SSH \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u0440\u0430\u0431\u043e\u0447\u0438\u043c \u0441\u0430\u0439\u0442\u043e\u043c. \u041f\u043e\u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u043e\u0431\u043e\u0439\u0442\u0438 \u0432\u0441\u0435 \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0435 \u043a\u0430\u043c\u043d\u0438.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435. \u0412\u0435\u0434\u044c \u044f \u0436\u0435 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432 \u043d\u0430\u0448\u0435\u043b. \u041f\u0440\u0430\u0432\u0434\u0430 \u043d\u0435 \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u043d\u0435 \u0431\u0435\u0437 \u043f\u043e\u043c\u043e\u0449\u0438 StackOverflow \u0438 \u0432\u0440\u044f\u0434 \u043b\u0438 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c. \u042f \u043f\u043e\u043c\u0443\u0447\u0438\u043b\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u0432\u0430\u043c \u0436\u0438\u0437\u043d\u044c \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-305937","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/305937","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=305937"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/305937\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=305937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=305937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=305937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}