{"id":86581,"date":"2020-06-27T07:42:16","date_gmt":"2020-06-27T05:42:16","guid":{"rendered":"https:\/\/prohoster.info\/blog\/administrirovanie\/deploj-prilozheniya-na-laravel-7-na-ubuntu-nginx"},"modified":"2020-06-27T07:42:16","modified_gmt":"2020-06-27T05:42:16","slug":"deploj-prilozheniya-na-laravel-7-na-ubuntu-nginx","status":"publish","type":"post","link":"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/deploj-prilozheniya-na-laravel-7-na-ubuntu-nginx","title":{"rendered":"Rakenduse kasutuselev\u00f5tt Laravel 7-l Ubuntu &amp; Nginx-il.","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"\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\" src=\"\/wp-content\/uploads\/2020\/06\/810744a9156f715a7945bbfcc2e39ae1.jpeg\" style=\"display:block;margin: 0 auto;\" \/><\/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><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/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 <noindex><a rel=\"nofollow\" 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><\/noindex>.<\/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<p>                        <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<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>\n<\/li>\n<li>\n<p><code>sudo apt install -y curl wget gnupg2 ca-certificates lsb-release apt-transport-https<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p><code>sudo apt-add-repository ppa:ondrej\/php<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p><code>sudo apt update<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p><strong>7.3:<\/strong> <code>sudo apt install -y php7.3-fpm php7.3-mysql<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p><strong>7.4:<\/strong> <code>sudo apt install -y php7.4-fpm php7.4-mysql<\/code><\/p>\n<p>\n<\/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>\n<\/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 {\n        listen 80;\n        root \/var\/www\/html;\n        index index.php index.html index.htm index.nginx-debian.html;\n        server_name &lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d \u0438\u043b\u0438 IP&gt;;\n\n        location \/ {\n                try_files $uri $uri\/ =404;\n        }\n\n        location ~ .php$ {\n                include snippets\/fastcgi-php.conf;\n                fastcgi_pass unix:\/var\/run\/php\/php7.4-fpm.sock;\n        }\n\n        location ~ \/.ht {\n                deny all;\n        }\n}<\/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 {\n    listen 80;\n    listen [::]:80;\n\n    root \/var\/www\/html\/&lt;\u0418\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430&gt;\/public;\n    index index.php index.html index.htm index.nginx-debian.html;\n\n    server_name &lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d \u0438\u043b\u0438 IP&gt;;\n\n    location \/ {\n        try_files $uri $uri\/ \/index.php?$query_string;\n    }\n\n    location ~ .php$ {\n        include snippets\/fastcgi-php.conf;\n        fastcgi_pass unix:\/var\/run\/php\/php7.4-fpm.sock;\n    }\n\n    location ~ \/.ht {\n        deny all;\n    }\n}<\/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 {\n    listen 80;\n    listen [::]:80;\n\n    server_name &lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt; www.&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;;\n    return 301 https:\/\/$server_name$request_uri;\n}\n\nserver {\n    listen 443 ssl http2;\n    listen [::]:443 ssl http2;\n    server_name &lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt; www.&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;;\n    root \/var\/www\/html\/&lt;\u0418\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430&gt;\/public;\n\n    ssl_certificate \/etc\/letsencrypt\/live\/&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;\/fullchain.pem;\n    ssl_certificate_key \/etc\/letsencrypt\/live\/&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;\/privkey.pem;\n\n    ssl_protocols TLSv1.2;\n    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;\n    ssl_prefer_server_ciphers on;\n\n    add_header X-Frame-Options &quot;SAMEORIGIN&quot;;\n    add_header X-XSS-Protection &quot;1; mode=block&quot;;\n    add_header X-Content-Type-Options &quot;nosniff&quot;;\n\n    index index.php index.html index.htm index.nginx-debian.html;\n\n    charset utf-8;\n\n    location \/ {\n            try_files $uri $uri\/ \/index.php?$query_string;\n    }\n\n    location ~ .php$ {\n        include snippets\/fastcgi-php.conf;\n        fastcgi_pass unix:\/var\/run\/php\/php7.4-fpm.sock;\n    }\n\n    location ~ \/.ht {\n            deny all;\n    }\n\n    location ~ \/.well-known {\n            allow all;\n    }\n}<\/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>\n<\/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>\n<\/li>\n<li>\n<p><code>mysql -u root -p<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p><code>CREATE DATABASE laravel DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;<\/code><\/p>\n<p>\n<\/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>\n<\/li>\n<li>\n<p><code>FLUSH PRIVILEGES;<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p><code>exit<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p><code>cd \/var\/www\/html<\/code><\/p>\n<p>\n<\/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>\n<\/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>\n<\/li>\n<li>\n<p><code>cd .\/&lt;\u0418\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430&gt;<\/code><\/p>\n<p>\n<\/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>\n<\/li>\n<li>\n<p><code>composer install<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p><code>vim .env<\/code><\/p>\n<p>\n<\/li>\n<\/ul>\n<p><\/p>\n<pre><code class=\"plaintext\">APP_NAME=Laravel\nAPP_ENV=production\nAPP_KEY=\nAPP_DEBUG=false\nAPP_URL=http:\/\/&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;\n\nLOG_CHANNEL=stack\n\nDB_CONNECTION=mysql\nDB_HOST=127.0.0.1\nDB_PORT=3306\nDB_DATABASE=laravel\nDB_USERNAME=root\nDB_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>\n<\/li>\n<li>\n<p><code>php artisan key:generate<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p><code>sudo chown -R $USER:www-data storage<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p><code>sudo chown -R $USER:www-data bootstrap\/cache<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p><code>chmod -R 775 storage<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p><code>chmod -R 775 bootstrap\/cache<\/code><\/p>\n<p>\n<\/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>\n<\/li>\n<li>\n<p><code>sudo apt install -y python-certbot-nginx<\/code><\/p>\n<p>\n<\/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>\n<\/li>\n<li>\n<p><code>sudo nginx -t<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p><code>sudo ufw allow 'Nginx HTTPS'<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p><code>sudo ufw status<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p><code>sudo systemctl reload nginx<\/code><\/p>\n<p>\n<\/li>\n<\/ul>\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<p>                        <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<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<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\n\nTo                         Action      From\n--                         ------      ----\nOpenSSH                    ALLOW       Anywhere\nOpenSSH (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\n\nTo                         Action      From\n--                         ------      ----\nOpenSSH                    ALLOW       Anywhere\nNginx HTTP                 ALLOW       Anywhere\nOpenSSH (v6)               ALLOW       Anywhere (v6)\nNginx 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\" alt=\"\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\" src=\"\/wp-content\/uploads\/2020\/06\/a63221c3c4e1a89a5905b760b9d4a491.jpeg\" style=\"display:block;margin: 0 auto;\" \/><\/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>\n<\/li>\n<li>\n<p>Remove anonymous users? \u2014 <code>Y<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p>Disallow root login remotely? \u2014 <code>N<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p>Remove test database and access to it? \u2014 <code>N<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p>Reload privilege tables now? \u2014 <code>Y<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 MySQL: <code>sudo mysql<\/code><\/p>\n<p>\n<\/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>\n<\/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>\n<\/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>\n<\/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>\n<\/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>\n<\/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 <noindex><a rel=\"nofollow\" href=\"https:\/\/launchpad.net\/~ondrej\/+archive\/ubuntu\/php\/\" rel=\"nofollow\">Ond\u0159ej Sur\u00fd<\/a><\/noindex><\/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 {\n        listen 80;\n        root \/var\/www\/html;\n        index index.php index.html index.htm index.nginx-debian.html;\n        server_name &lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d \u0438\u043b\u0438 IP&gt;;\n\n        location \/ {\n                try_files $uri $uri\/ =404;\n        }\n\n        location ~ .php$ {\n                include snippets\/fastcgi-php.conf;\n                fastcgi_pass unix:\/var\/run\/php\/php7.4-fpm.sock;\n        }\n\n        location ~ \/.ht {\n                deny all;\n        }\n}<\/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\" alt=\"\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\" src=\"\/wp-content\/uploads\/2020\/06\/e503f93289858982fc3552f46effcbaf.jpeg\" style=\"display:block;margin: 0 auto;\" \/><\/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>\n<\/li>\n<li>\n<p>7.4: <code>sudo apt install php7.4-mbstring php7.4-xml composer unzip<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 MySQL: <code>mysql -u root -p<\/code><\/p>\n<p>\n<\/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>\n<\/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>\n<\/li>\n<li>\n<p><code>FLUSH PRIVILEGES;<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p><code>exit<\/code><\/p>\n<p>\n<\/li>\n<li>\n<p><code>cd \/var\/www\/html<\/code><\/p>\n<p>\n<\/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>\n<\/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>\n<\/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\nAPP_ENV=production\nAPP_KEY=\nAPP_DEBUG=false\nAPP_URL=http:\/\/&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;\n\nLOG_CHANNEL=stack\n\nDB_CONNECTION=mysql\nDB_HOST=127.0.0.1\nDB_PORT=3306\nDB_DATABASE=laravel\nDB_USERNAME=root\nDB_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 {\n    listen 80;\n    listen [::]:80;\n\n    root \/var\/www\/html\/&lt;\u0418\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430&gt;\/public;\n    index index.php index.html index.htm index.nginx-debian.html;\n\n    server_name &lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d \u0438\u043b\u0438 IP&gt;;\n\n    location \/ {\n        try_files $uri $uri\/ \/index.php?$query_string;\n    }\n\n    location ~ .php$ {\n        include snippets\/fastcgi-php.conf;\n        fastcgi_pass unix:\/var\/run\/php\/php7.4-fpm.sock;\n    }\n\n    location ~ \/.ht {\n        deny all;\n    }\n}<\/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 \/>\n\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 \/>\n\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 {\n    listen 80;\n    listen [::]:80;\n\n    server_name &lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt; www.&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;;\n    return 301 https:\/\/$server_name$request_uri;\n}\n\nserver {\n    listen 443 ssl http2;\n    listen [::]:443 ssl http2;\n    server_name &lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt; www.&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;;\n    root \/var\/www\/html\/&lt;\u0418\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430&gt;\/public;\n\n    ssl_certificate \/etc\/letsencrypt\/live\/&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;\/fullchain.pem;\n    ssl_certificate_key \/etc\/letsencrypt\/live\/&lt;\u0412\u0430\u0448 \u0434\u043e\u043c\u0435\u043d&gt;\/privkey.pem;\n\n    ssl_protocols TLSv1.2;\n    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;\n    ssl_prefer_server_ciphers on;\n\n    add_header X-Frame-Options &quot;SAMEORIGIN&quot;;\n    add_header X-XSS-Protection &quot;1; mode=block&quot;;\n    add_header X-Content-Type-Options &quot;nosniff&quot;;\n\n    index index.php index.html index.htm index.nginx-debian.html;\n\n    charset utf-8;\n\n    location \/ {\n            try_files $uri $uri\/ \/index.php?$query_string;\n    }\n\n    location ~ .php$ {\n        include snippets\/fastcgi-php.conf;\n        fastcgi_pass unix:\/var\/run\/php\/php7.4-fpm.sock;\n    }\n\n    location ~ \/.ht {\n            deny all;\n    }\n\n    location ~ \/.well-known {\n            allow all;\n    }\n}<\/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 <noindex><a rel=\"nofollow\" href=\"https:\/\/gist.github.com\/vicgonvt\/cd0431a5cdc043ebab7f4954f7b4d471\" rel=\"nofollow\">\u0432\u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0433\u0438\u0441\u0442\u0430<\/a><\/noindex>, \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<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/508162\/\">habr.com<\/a> <\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<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 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":86582,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-86581","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"\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\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/deploj-prilozheniya-na-laravel-7-na-ubuntu-nginx\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"et_EE\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\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 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\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\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/deploj-prilozheniya-na-laravel-7-na-ubuntu-nginx\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-06-27T05:42:16+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-06-27T05:42:16+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Rakenduse juurutamine Laravel 7-s Ubuntu &amp; Nginx | ProHoster","description":"Otsustasin luua oma portfoolio Laravel 7 peal. Et avaleht oleks maandumisleht ja kogu teave seal oleks administratiivpaneeli abil muudetav. Aga ei see ei ole peamine. Asja tuum on juurutamine. Leidsin paar head \u00f5petust, kuidas seda teha t\u00e4isv\u00e4\u00e4rtuslikul serveril k\u00f5ikide keerukustega. Juurutamine ei ole minu tugevus, olen pigem front-end'i inimene.","canonical_url":"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/deploj-prilozheniya-na-laravel-7-na-ubuntu-nginx","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"et_EE","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\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 | ProHoster","og:description":"\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","og:url":"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/deploj-prilozheniya-na-laravel-7-na-ubuntu-nginx","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-06-27T05:42:16+00:00","article:modified_time":"2020-06-27T05:42:16+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"86581","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 10:49:10","updated":"2022-10-03 10:25:42"},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/posts\/86581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/comments?post=86581"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/posts\/86581\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/media\/86582"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/media?parent=86581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/categories?post=86581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/tags?post=86581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}