{"id":15005,"date":"2024-03-11T11:26:11","date_gmt":"2024-03-11T07:56:11","guid":{"rendered":"https:\/\/www.itpiran.net\/blog\/?p=15005"},"modified":"2024-03-11T11:26:11","modified_gmt":"2024-03-11T07:56:11","slug":"how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application","status":"publish","type":"post","link":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\/","title":{"rendered":"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 NestJS \u0628\u0627 Nginx \u062f\u0631 Ubuntu VPS"},"content":{"rendered":"<h2 id=\"%d9%85%d9%82%d8%af%d9%85%d9%87\">\u0645\u0642\u062f\u0645\u0647<\/h2>\n<p>\u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0648\u0628 \u0645\u062f\u0631\u0646 \u0645\u062a\u06a9\u06cc \u0628\u0647 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 \u0645\u062d\u06a9\u0645 \u0648 \u0627\u06cc\u0645\u0646 \u0647\u0633\u062a\u0646\u062f. \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646\u060c \u0627\u06cc\u062c\u0627\u062f \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u06a9\u0647 \u0645\u0642\u06cc\u0627\u0633\u200c\u067e\u0630\u06cc\u0631\u060c \u0627\u06cc\u0645\u0646 \u0648 \u0627\u0632 \u0646\u0638\u0631 \u0645\u0639\u0645\u0627\u0631\u06cc \u067e\u06cc\u0686\u06cc\u062f\u0647 \u0628\u0627\u0634\u0646\u062f\u060c \u0636\u0631\u0648\u0631\u06cc \u0627\u0633\u062a \u062a\u0627 \u062a\u0648\u0633\u0637 \u062a\u06cc\u0645\u200c\u0647\u0627\u06cc \u06a9\u0648\u0686\u06a9 \u0648\/\u06cc\u0627 \u0628\u0632\u0631\u06af \u062a\u0648\u0633\u0639\u0647\u200c\u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u0645\u062f\u06cc\u0631\u06cc\u062a \u0634\u0648\u0646\u062f.<\/p>\n<p>\u062a\u0648\u0633\u0639\u0647 \u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u0645\u062f\u0631\u0646 \u062a\u0631\u062c\u06cc\u062d \u0645\u06cc \u062f\u0647\u0646\u062f \u0627\u0632 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u062f\u0631 \u0642\u0633\u0645\u062a \u062c\u0644\u0648\u06cc\u06cc \u0648 \u067e\u0634\u062a\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u0646\u062f. Express.js \u06cc\u06a9 \u0686\u0627\u0631\u0686\u0648\u0628 \u0639\u0627\u0644\u06cc \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0627\u0633\u062a \u06a9\u0647 \u062a\u0648\u0633\u0637 \u0627\u06a9\u062b\u0631 \u062a\u0648\u0633\u0639\u0647 \u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f. \u0628\u0627 \u0627\u06cc\u0646 \u062d\u0627\u0644\u060c \u062d\u062f\u0627\u0642\u0644 \u0645\u0639\u0645\u0627\u0631\u06cc \u0622\u0646\u060c \u0622\u0646 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0645\u0642\u06cc\u0627\u0633 \u067e\u0630\u06cc\u0631\u06cc \u0648 \u0646\u06af\u0647\u062f\u0627\u0631\u06cc \u062a\u0648\u0633\u0637 \u062a\u06cc\u0645 \u0647\u0627\u06cc \u0628\u0632\u0631\u06af \u0646\u0627\u0645\u0646\u0627\u0633\u0628 \u0645\u06cc \u06a9\u0646\u062f. \u0627\u06cc\u0646\u062c\u0627\u0633\u062a \u06a9\u0647 Nest.js \u0648\u0627\u0631\u062f \u0639\u0645\u0644 \u0645\u06cc \u0634\u0648\u062f. Nest.js \u062f\u0627\u0631\u0627\u06cc \u0645\u0639\u0645\u0627\u0631\u06cc \u062f\u0627\u062e\u0644\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0622\u0646 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0645\u0642\u06cc\u0627\u0633 \u067e\u0630\u06cc\u0631\u06cc \u0648 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u0628\u0633\u06cc\u0627\u0631 \u0645\u0646\u0627\u0633\u0628 \u0645\u06cc \u06a9\u0646\u062f. \u0647\u0645\u0686\u0646\u06cc\u0646\u060c \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0628\u0648\u0645\u06cc \u0622\u0646 \u0627\u0632 TypeScript \u0622\u0646 \u0631\u0627 \u0628\u0631\u0627\u06cc \u062a\u0648\u0633\u0639\u0647 \u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u0633\u0627\u0632\u0646\u062f\u0647 \u062a\u0631 \u0627\u0632 \u0648\u0627\u0646\u06cc\u0644\u06cc \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0645\u06cc \u06a9\u0646\u062f.<\/p>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634\u060c \u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 NestJS \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0648\u0628 \u0633\u0631\u0648\u0631 Nginx\u060c \u0631\u0648\u06cc VPS \u0631\u0627 \u062e\u0648\u0627\u0647\u06cc\u062f \u0622\u0645\u0648\u062e\u062a. \u0634\u0645\u0627 \u06cc\u0627\u062f \u062e\u0648\u0627\u0647\u06cc\u062f \u06af\u0631\u0641\u062a \u06a9\u0647 \u0686\u06af\u0648\u0646\u0647 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0631\u0646\u0627\u0645\u0647 \u062e\u0648\u062f \u0631\u0627 \u0628\u0627 \u0627\u0645\u0646\u06cc\u062a \u0644\u0627\u0632\u0645 \u062f\u0631 \u0648\u0628 \u0642\u0631\u0627\u0631 \u062f\u0647\u06cc\u062f.<\/p>\n<h5 id=\"%d9%be%db%8c%d8%b4-%d9%86%db%8c%d8%a7%d8%b2%d9%87%d8%a7\">\u067e\u06cc\u0634 \u0646\u06cc\u0627\u0632\u0647\u0627<\/h5>\n<ul>\n<li>\u06cc\u06a9 Ubuntu 20.04+ VPS \u06cc\u0627 \u06cc\u06a9 \u0645\u0627\u0634\u06cc\u0646 \u0641\u06cc\u0632\u06cc\u06a9\u06cc \u0627\u0648\u0628\u0648\u0646\u062a\u0648<\/li>\n<li>Node.js \u0648 \u0645\u062f\u06cc\u0631 \u0628\u0633\u062a\u0647 npm (\u06cc\u0627 yarn).<\/li>\n<li>\u0648\u0628 \u0633\u0631\u0648\u0631 Nginx<\/li>\n<\/ul>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-1-%d8%a2%d9%85%d8%a7%d8%af%d9%87-%d8%b3%d8%a7%d8%b2%db%8c-%d9%88-%d8%a7%d8%b3%d8%aa%d9%82%d8%b1%d8%a7%d8%b1-%db%8c%da%a9-%d8%a8%d8%b1%d9%86%d8%a7%d9%85%d9%87-nes\">\u0645\u0631\u062d\u0644\u0647 1 &#8211; \u0622\u0645\u0627\u062f\u0647 \u0633\u0627\u0632\u06cc \u0648 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 NestJS<\/h2>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0628\u062e\u0634\u060c NestJS CLI \u0631\u0627 \u0646\u0635\u0628 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f \u0648 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0627\u0648\u0644\u06cc\u0647 NestJS \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f \u06a9\u0647 \u062f\u0631 \u0628\u062e\u0634\u200c\u0647\u0627\u06cc \u0628\u0639\u062f\u06cc \u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u0622\u0646 \u0631\u0627 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 Nginx \u062e\u0648\u0627\u0647\u06cc\u062f \u0622\u0645\u0648\u062e\u062a.<\/p>\n<h5 id=\"%d9%86%d8%b5%d8%a8-nestjs-cli-%d8%a8%d9%87-%d8%b5%d9%88%d8%b1%d8%aa-%d8%ac%d9%87%d8%a7%d9%86%db%8c\">\u0646\u0635\u0628 NestJS CLI \u0628\u0647 \u0635\u0648\u0631\u062a \u062c\u0647\u0627\u0646\u06cc<\/h5>\n<p>\u0628\u0631\u0627\u06cc \u0646\u0635\u0628 NestJS CLI \u062f\u0631 \u062f\u0633\u062a\u06af\u0627\u0647 \u0627\u0648\u0628\u0648\u0646\u062a\u0648\u060c \u06cc\u06a9 \u062a\u0631\u0645\u06cc\u0646\u0627\u0644 \u0631\u0627 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f \u0648 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0627 \u062a\u0627\u06cc\u067e \u06a9\u0646\u06cc\u062f.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>npm i -g @nestjs\/cli<\/code><\/pre>\n<\/div>\n<p>\u0628\u0627 \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0631\u0627\u0628\u0637 \u062e\u0637 \u0641\u0631\u0645\u0627\u0646 NestJS \u0631\u0648\u06cc \u062f\u0633\u062a\u06af\u0627\u0647 \u0634\u0645\u0627 \u0646\u0635\u0628 \u0645\u06cc \u0634\u0648\u062f. \u0628\u0639\u062f\u060c \u0634\u0645\u0627 \u06cc\u0627\u062f \u062e\u0648\u0627\u0647\u06cc\u062f \u06af\u0631\u0641\u062a \u06a9\u0647 \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 \u062c\u062f\u06cc\u062f NestJS \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<h5 id=\"%d8%a7%db%8c%d8%ac%d8%a7%d8%af-%db%8c%da%a9-%d9%be%d8%b1%d9%88%da%98%d9%87-%d8%ac%d8%af%db%8c%d8%af-nestjs\">\u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 \u062c\u062f\u06cc\u062f NestJS<\/h5>\n<p>\u0627\u06a9\u0646\u0648\u0646 NestJS \u062f\u0648 \u0631\u0627\u0647 \u0628\u0631\u0627\u06cc \u0634\u0631\u0648\u0639 \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 \u062c\u062f\u06cc\u062f \u0627\u0631\u0627\u0626\u0647 \u0645\u06cc \u062f\u0647\u062f. \u0634\u0645\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0647\u062a\u0631\u06cc\u0646 \u0631\u0648\u0634 \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u0628\u0631\u0627\u06cc \u0634\u0645\u0627 \u0645\u0646\u0627\u0633\u0628 \u0627\u0633\u062a.<\/p>\n<p>\u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 NestJS \u0628\u0627 CLI\u060c \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0627 \u062a\u0627\u06cc\u067e \u06a9\u0646\u06cc\u062f.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>nest new &lt;project-name&gt;<\/code><\/pre>\n<\/div>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Output? Which package manager would you \u2764\ufe0f to use? (Use arrow keys)\r\n\u276f npm \r\nyarn \r\npnpm<\/code><\/pre>\n<\/div>\n<p>\u067e\u0633 \u0627\u0632 \u0627\u062a\u0645\u0627\u0645\u060c \u062e\u0631\u0648\u062c\u06cc \u0627\u06cc \u0645\u0627\u0646\u0646\u062f \u062f\u0646\u0628\u0627\u0644 \u06a9\u0631\u062f\u0646 \u062f\u0631\u06cc\u0627\u0641\u062a \u062e\u0648\u0627\u0647\u06cc\u062f \u06a9\u0631\u062f.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>OutputCREATE node_app\/.eslintrc.js (663 bytes)\r\nCREATE node_app\/.prettierrc (51 bytes)\r\nCREATE node_app\/README.md (3340 bytes)\r\nCREATE node_app\/nest-cli.json (171 bytes)\r\nCREATE node_app\/package.json (1947 bytes)\r\nCREATE node_app\/tsconfig.build.json (97 bytes)\r\nCREATE node_app\/tsconfig.json (546 bytes)\r\nCREATE node_app\/src\/app.controller.ts (274 bytes)\r\nCREATE node_app\/src\/app.module.ts (249 bytes)\r\nCREATE node_app\/src\/app.service.ts (142 bytes)\r\nCREATE node_app\/src\/main.ts (208 bytes)\r\nCREATE node_app\/src\/app.controller.spec.ts (617 bytes)\r\nCREATE node_app\/test\/jest-e2e.json (183 bytes)\r\nCREATE node_app\/test\/app.e2e-spec.ts (630 bytes)<\/code><\/pre>\n<\/div>\n<p>\u0627\u06cc\u0646 \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 \u062c\u062f\u06cc\u062f \u062f\u0631 \u0641\u0647\u0631\u0633\u062a \u06a9\u0627\u0631\u06cc \u0641\u0639\u0644\u06cc \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc \u06a9\u0646\u062f. \u0634\u0645\u0627 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0647 \u062c\u0627\u06cc <code>&lt;project-name&amp;gt;<\/code> \u0645\u0633\u06cc\u0631 \u0645\u0637\u0644\u0642 \u0631\u0627 \u0628\u0631\u0627\u06cc \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u062f\u06cc\u06af\u0631\u06cc \u0646\u06cc\u0632 \u0627\u0631\u0627\u0626\u0647 \u062f\u0647\u06cc\u062f.<\/p>\n<h5 id=\"%d8%b4%d8%a8%db%8c%d9%87-%d8%b3%d8%a7%d8%b2%db%8c-%d9%82%d8%a7%d9%84%d8%a8-%d8%a7%d8%b3%d8%aa%d8%a7%d8%b1%d8%aa%d8%b1\">\u0634\u0628\u06cc\u0647 \u0633\u0627\u0632\u06cc \u0642\u0627\u0644\u0628 \u0627\u0633\u062a\u0627\u0631\u062a\u0631<\/h5>\n<p>NestJS \u06cc\u06a9 \u0631\u0627\u0647 \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646 \u0628\u0631\u0627\u06cc \u0634\u0631\u0648\u0639 \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 \u062c\u062f\u06cc\u062f \u0627\u0631\u0627\u0626\u0647 \u0645\u06cc \u062f\u0647\u062f. \u0627\u06cc\u0646 \u06cc\u06a9 \u0645\u062e\u0632\u0646 git \u0627\u0633\u062a \u06a9\u0647 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u06af\u0648\u06cc \u062f\u06cc\u06af \u0628\u062e\u0627\u0631 \u0639\u0645\u0644 \u0645\u06cc \u06a9\u0646\u062f. \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0622\u0646 \u0645\u062e\u0632\u0646 \u0631\u0627 \u06a9\u0644\u0648\u0646 \u06a9\u0631\u062f\u0647 \u0648 \u0628\u0627 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0632\u06cc\u0631 \u067e\u0631\u0648\u0698\u0647 \u0631\u0627 \u0634\u0631\u0648\u0639 \u06a9\u0646\u06cc\u062f.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>git clone https:\/\/github.com\/nestjs\/typescript-starter.git &lt;project-directory &gt;<\/code><\/pre>\n<\/div>\n<p>\u067e\u0633 \u0627\u0632 \u0627\u06cc\u0646\u06a9\u0647 \u06a9\u0644\u0648\u0646\u06cc\u0646\u06af \u06a9\u0627\u0645\u0644 \u0634\u062f\u060c \u0628\u0627\u06cc\u062f cd \u0631\u0627 \u0628\u0647 \u0641\u0647\u0631\u0633\u062a \u067e\u0631\u0648\u0698\u0647 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f \u0648 \u0633\u067e\u0633 npm install \u0631\u0627 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f \u062a\u0627 \u0648\u0627\u0628\u0633\u062a\u06af\u06cc \u0647\u0627 \u0631\u0627 \u0627\u0632 package.json \u0646\u0635\u0628 \u06a9\u0646\u06cc\u062f.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>cd &lt;project-directory&gt;\r\nnpm install<\/code><\/pre>\n<\/div>\n<p>\u067e\u0633 \u0627\u0632 \u0622\u0645\u0627\u062f\u0647 \u0634\u062f\u0646 \u067e\u0631\u0648\u0698\u0647\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0633\u0631\u0648\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0631\u0627 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06a9\u0646\u06cc\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>npm run start<\/code><\/pre>\n<\/div>\n<p>\u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0631\u0627 \u062f\u0631 http:\/\/localhost:3000 \u0627\u062c\u0631\u0627 \u0645\u06cc \u06a9\u0646\u062f. \u0627\u06a9\u0646\u0648\u0646\u060c \u0634\u0645\u0627 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 \u0627\u0633\u0627\u0633\u06cc NestJS \u0622\u0645\u0627\u062f\u0647 \u0627\u062c\u0631\u0627 \u062f\u0631 \u0644\u0648\u06a9\u0627\u0644 \u0647\u0627\u0633\u062a \u062f\u0627\u0631\u06cc\u062f.<\/p>\n<h5 id=\"%d8%aa%d8%b3%d8%aa-%d8%a7%d9%be%d9%84%db%8c%da%a9%db%8c%d8%b4%d9%86\">\u062a\u0633\u062a \u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646<\/h5>\n<p>\u0647\u0646\u06af\u0627\u0645\u06cc \u06a9\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u062e\u0648\u062f \u0631\u0627 \u062a\u0648\u0633\u0639\u0647 \u062f\u0627\u062f\u06cc\u062f\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u062a\u0633\u062a \u0647\u0627\u06cc\u06cc \u0631\u0627 \u0631\u0648\u06cc \u0622\u0646 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f \u062a\u0627 \u0628\u0631\u0631\u0633\u06cc \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u0622\u06cc\u0627 \u0628\u0631\u0646\u0627\u0645\u0647 \u0645\u0637\u0627\u0628\u0642 \u0627\u0646\u062a\u0638\u0627\u0631 \u0627\u062c\u0631\u0627 \u0645\u06cc \u0634\u0648\u062f \u06cc\u0627 \u062e\u06cc\u0631. NestJS \u062a\u0633\u062a\u200c\u0647\u0627\u06cc Jest \u067e\u06cc\u0634\u200c\u0641\u0631\u0636 \u0631\u0627 \u0627\u0631\u0627\u0626\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f \u06a9\u0647 \u0622\u0632\u0645\u0627\u06cc\u0634\u200c\u0647\u0627\u06cc\u06cc \u0631\u0627 \u0631\u0648\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0634\u0645\u0627 \u0627\u062c\u0631\u0627 \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f. \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u062a\u0633\u062a \u0631\u0627 \u0634\u0631\u0648\u0639 \u06a9\u0646\u06cc\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>npm run test<\/code><\/pre>\n<\/div>\n<p>\u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0634\u0645\u0627 \u0631\u0627 \u0622\u0632\u0645\u0627\u06cc\u0634 \u0645\u06cc \u06a9\u0646\u062f \u0648 \u0646\u062a\u0627\u06cc\u062c \u0645\u0634\u0627\u0628\u0647 \u0632\u06cc\u0631 \u0631\u0627 \u0646\u0634\u0627\u0646 \u0645\u06cc \u062f\u0647\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Output&gt; node_app@0.0.1 test\r\n&gt; jest\r\nPASS src\/app.controller.spec.ts\r\nAppController\r\nroot\r\n\u2713 should return \"Hello World!\" (24 ms)\r\nTest Suites: 1 passed, 1 total\r\nTests: 1 passed, 1 total\r\nSnapshots: 0 total\r\nTime: 2.895 s\r\nRan all test suites.<\/code><\/pre>\n<\/div>\n<p>\u062f\u0631 \u0628\u062e\u0634 \u0632\u06cc\u0631\u060c \u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 NestJS \u0631\u0627 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 Nginx \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u06cc\u06a9 \u067e\u0631\u0648\u06a9\u0633\u06cc \u0645\u0639\u06a9\u0648\u0633 \u0628\u0631 \u0631\u0648\u06cc \u0648\u0628 \u0633\u0631\u0648\u0631 \u062e\u0648\u062f \u062e\u0648\u0627\u0647\u06cc\u062f \u0622\u0645\u0648\u062e\u062a.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-2-%d8%aa%d9%86%d8%b8%db%8c%d9%85-nginx-%d8%a8%d8%b1%d8%a7%db%8c-%d8%ae%d8%af%d9%85%d8%aa-%d8%a8%d9%87-%d8%a8%d8%b1%d9%86%d8%a7%d9%85%d9%87-nestjs\">\u0645\u0631\u062d\u0644\u0647 2 &#8211; \u062a\u0646\u0638\u06cc\u0645 Nginx \u0628\u0631\u0627\u06cc \u062e\u062f\u0645\u062a \u0628\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 NestJS<\/h2>\n<p>\u0627\u06a9\u0646\u0648\u0646\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u0645 \u0628\u0627 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u0648\u0628 \u0633\u0631\u0648\u0631 \u0628\u0631\u0627\u06cc \u0645\u06cc\u0632\u0628\u0627\u0646\u06cc \u0627\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 NestJS \u067e\u06cc\u0634 \u0628\u0631\u0648\u06cc\u0645. \u0645\u0627 \u0627\u0632 \u0631\u0648\u06cc\u06a9\u0631\u062f \u067e\u0631\u0627\u06a9\u0633\u06cc \u0645\u0639\u06a9\u0648\u0633 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u062e\u0648\u0627\u0647\u06cc\u0645 \u06a9\u0631\u062f. \u062f\u0631 \u0627\u06cc\u0646 \u0631\u0648\u06cc\u06a9\u0631\u062f\u060c \u0645\u0627 \u0628\u0631\u0646\u0627\u0645\u0647 \u062e\u0648\u062f \u0631\u0627 \u0628\u0631 \u0631\u0648\u06cc \u0644\u0648\u06a9\u0627\u0644 \u0647\u0627\u0633\u062a \u062f\u0631 \u06cc\u06a9 \u067e\u0648\u0631\u062a \u062e\u0627\u0635 \u0627\u062c\u0631\u0627 \u0645\u06cc \u06a9\u0646\u06cc\u0645 \u0648 \u0633\u067e\u0633 \u0627\u0632 \u0633\u0631\u0648\u0631 Nginx \u0628\u0631\u0627\u06cc \u067e\u0631\u0627\u06a9\u0633\u06cc \u06a9\u0631\u062f\u0646 \u0647\u0631\u06af\u0648\u0646\u0647 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0628\u0647 \u0622\u062f\u0631\u0633 IP \u0639\u0645\u0648\u0645\u06cc VPS \u06cc\u0627 \u062f\u0627\u0645\u0646\u0647 \u0628\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u062f\u0631 \u0644\u0648\u06a9\u0627\u0644 \u0647\u0627\u0633\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u06cc\u0645. \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0633\u0631\u0648\u0631\u0647\u0627\u06cc \u067e\u0631\u0648\u06a9\u0633\u06cc \u0645\u0639\u06a9\u0648\u0633 \u06cc\u06a9 \u0631\u0648\u0634 \u0635\u0646\u0639\u062a\u06cc \u0627\u0633\u062a \u0632\u06cc\u0631\u0627 \u0628\u0627 \u0627\u06cc\u062c\u0627\u062f \u0645\u0627\u0646\u0639\u06cc \u0628\u06cc\u0646 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0647\u0627\u06cc \u062f\u0631\u06cc\u0627\u0641\u062a\u06cc \u0648 \u062e\u0648\u062f \u0628\u0631\u0646\u0627\u0645\u0647 \u0628\u0627\u0637\u0646\u060c \u0627\u0645\u0646\u06cc\u062a \u0648\u0628 \u0633\u0631\u0648\u0631 \u0631\u0627 \u0627\u0641\u0632\u0627\u06cc\u0634 \u0645\u06cc \u062f\u0647\u062f. \u0647\u0645\u0686\u0646\u06cc\u0646\u060c \u067e\u0631\u0627\u06a9\u0633\u06cc\u200c\u0647\u0627\u06cc \u0645\u0639\u06a9\u0648\u0633 \u0627\u0645\u06a9\u0627\u0646 \u0645\u062f\u06cc\u0631\u06cc\u062a \u0628\u0627\u0631 \u0628\u0647\u062a\u0631 \u0631\u0648\u06cc \u0633\u0631\u0648\u0631 \u0631\u0627 \u0641\u0631\u0627\u0647\u0645 \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f\u060c \u0645\u062e\u0635\u0648\u0635\u0627\u064b \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u0627\u0632 \u0633\u0631\u0648\u0631 \u0628\u0631\u0627\u06cc \u0645\u06cc\u0632\u0628\u0627\u0646\u06cc \u0686\u0646\u062f\u06cc\u0646 \u0628\u0631\u0646\u0627\u0645\u0647 \u0648\u0628 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f.<\/p>\n<p>\u0645\u0627 \u0628\u0627 \u0646\u0635\u0628 \u067e\u06a9\u06cc\u062c \u0645\u0646\u06cc\u062c\u0631 <code>pm2<\/code> \u0634\u0631\u0648\u0639 \u0645\u06cc \u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u0631\u0627 \u062f\u0631 \u0632\u0645\u0627\u0646 \u0627\u062c\u0631\u0627 \u0645\u062f\u06cc\u0631\u06cc\u062a \u0645\u06cc \u06a9\u0646\u062f.<\/p>\n<h5 id=\"%d9%86%d8%b5%d8%a8-pm2-process-manager\">\u0646\u0635\u0628 pm2 Process Manager<\/h5>\n<p>\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0645\u062f\u06cc\u0631 \u0641\u0631\u0622\u06cc\u0646\u062f <code>pm2<\/code> \u0631\u0627 \u0646\u0635\u0628 \u06a9\u0646\u06cc\u062f.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>npm install -g pm2<\/code><\/pre>\n<\/div>\n<p>\u0628\u0627 \u0627\u06cc\u0646 \u06a9\u0627\u0631 <code>pm2<\/code> \u0628\u0647 \u0635\u0648\u0631\u062a \u0633\u0631\u0627\u0633\u0631\u06cc \u0631\u0648\u06cc \u062f\u0633\u062a\u06af\u0627\u0647 \u0634\u0645\u0627 \u0646\u0635\u0628 \u0645\u06cc \u0634\u0648\u062f.<\/p>\n<h5 id=\"%d8%a7%db%8c%d8%ac%d8%a7%d8%af-%d9%be%db%8c%da%a9%d8%b1%d8%a8%d9%86%d8%af%db%8c-nginx-%d8%a8%d8%b1%d8%a7%db%8c-%d8%a8%d8%b1%d9%86%d8%a7%d9%85%d9%87-nestjs\">\u0627\u06cc\u062c\u0627\u062f \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc Nginx \u0628\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 NestJS<\/h5>\n<p>\u0627\u06a9\u0646\u0648\u0646\u060c Nginx \u0631\u0627 \u0628\u0631\u0627\u06cc \u0627\u062c\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u06a9\u0646\u06cc\u062f. \u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u062f\u0631 \u0622\u0645\u0648\u0632\u0634 \u067e\u06cc\u0634 \u0646\u06cc\u0627\u0632 \u0630\u06a9\u0631 \u0634\u062f\u060c \u0645\u0637\u0645\u0626\u0646 \u0634\u0648\u06cc\u062f \u06a9\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 Nginx \u0631\u0627 \u0628\u0631\u0627\u06cc HTTP \u0648 HTTPS \u062f\u0631 \u0641\u0627\u06cc\u0631\u0648\u0627\u0644 \u062e\u0648\u062f \u0645\u062c\u0627\u0632 \u06a9\u0631\u062f\u0647 \u0627\u06cc\u062f. \u0627\u06af\u0631 \u0627\u0632 \u0641\u0627\u06cc\u0631\u0648\u0627\u0644 ufw \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u06cc\u062f\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0627 \u062f\u0646\u0628\u0627\u0644 \u06a9\u0631\u062f\u0646 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u062f\u0647\u06cc\u062f.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>ufw enable\r\nufw allow \u2018Nginx Full\u2018<\/code><\/pre>\n<\/div>\n<p>\u0627\u06a9\u0646\u0648\u0646\u060c \u06cc\u06a9 \u0628\u0644\u0648\u06a9 \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0628\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 NestJS \u0645\u0627 \u0627\u06cc\u062c\u0627\u062f \u062e\u0648\u0627\u0647\u06cc\u062f \u06a9\u0631\u062f. \u062a\u0648\u0635\u06cc\u0647 \u0645\u06cc \u0634\u0648\u062f \u0628\u0647 \u062c\u0627\u06cc \u0648\u06cc\u0631\u0627\u06cc\u0634 \u062a\u0646\u0638\u06cc\u0645\u0627\u062a \u067e\u06cc\u0634 \u0641\u0631\u0636\u060c \u0628\u0644\u0648\u06a9 \u0647\u0627\u06cc \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u062c\u062f\u06cc\u062f \u0628\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u062c\u062f\u06cc\u062f \u0627\u06cc\u062c\u0627\u062f \u06a9\u0646\u06cc\u062f. \u0628\u0631\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u0628\u0644\u0648\u06a9\u060c \u06a9\u062f \u0632\u06cc\u0631 \u0631\u0627 \u062f\u0631 \u062a\u0631\u0645\u06cc\u0646\u0627\u0644 \u062e\u0648\u062f \u062a\u0627\u06cc\u067e \u06a9\u0646\u06cc\u062f.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo nano \/etc\/nginx\/sites-available\/your_domain<\/code><\/pre>\n<\/div>\n<p>\u062f\u0631 \u0627\u06cc\u0646\u062c\u0627\u060c \u0645\u0627 \u0627\u0632 your_domain \u0628\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f\u0647 \u0627\u06cc\u0645\u060c \u0627\u0645\u0627 \u0634\u0645\u0627 \u0622\u0646 \u0631\u0627 \u0628\u0647 \u0646\u0627\u0645 \u0628\u0631\u0646\u0627\u0645\u0647 \u062e\u0648\u062f \u062a\u063a\u06cc\u06cc\u0631 \u0645\u06cc \u062f\u0647\u06cc\u062f. \u0633\u067e\u0633 \u062f\u0631 \u0648\u06cc\u0631\u0627\u06cc\u0634\u06af\u0631 \u06a9\u062f \u0632\u06cc\u0631 \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>server {\r\nserver_name your_domain www.your_domain;\r\nlocation \/ {\r\nproxy_pass http:\/\/localhost:3000;\r\nproxy_http_version 1.1;\r\nproxy_set_header Upgrade $http_upgrade;\r\nproxy_set_header Connection 'upgrade';\r\nproxy_set_header Host $host;\r\nproxy_cache_bypass $http_upgrade;\r\n}\r\n}<\/code><\/pre>\n<\/div>\n<p>\u0627\u06a9\u0646\u0648\u0646\u060c \u06cc\u06a9 \u0633\u06cc\u0645 \u067e\u06cc\u0648\u0646\u062f \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f \u06a9\u0647 \u0628\u0647 Nginx \u0645\u06cc\u200c\u06af\u0648\u06cc\u062f \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0647\u0627\u06cc \u0648\u0628 \u0645\u0648\u062c\u0648\u062f \u0631\u0627 \u062f\u0631 \u067e\u0648\u0634\u0647 sites-available \u062c\u0633\u062a\u062c\u0648 \u06a9\u0646\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo ln -s \/etc\/nginx\/sites-available\/your_domain \/etc\/nginx\/sites-enabled\/<\/code><\/pre>\n<\/div>\n<p>\u0647\u0645\u0686\u0646\u06cc\u0646\u060c \u0634\u0645\u0627 \u0628\u0627\u06cc\u062f \u0633\u06cc\u0645 \u0644\u06cc\u0646\u06a9 \u067e\u06cc\u0634 \u0641\u0631\u0636 \u0631\u0627 \u063a\u06cc\u0631\u0641\u0639\u0627\u0644 \u06a9\u0646\u06cc\u062f\u060c \u062f\u0631 \u063a\u06cc\u0631 \u0627\u06cc\u0646 \u0635\u0648\u0631\u062a\u060c nginx \u0647\u0645\u0647 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0647\u0627 \u0631\u0627 \u0628\u0647 \u0633\u0627\u06cc\u062a \u067e\u06cc\u0634 \u0641\u0631\u0636 \u0647\u062f\u0627\u06cc\u062a \u0645\u06cc \u06a9\u0646\u062f. \u0628\u0631\u0627\u06cc \u0644\u063a\u0648 \u067e\u06cc\u0648\u0646\u062f \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo unlink \/etc\/nginx\/sites-enabled\/default<\/code><\/pre>\n<\/div>\n<p>\u0627\u06a9\u0646\u0648\u0646 \u0633\u0631\u0648\u06cc\u0633 Nginx \u0631\u0627 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u0645\u062c\u062f\u062f \u06a9\u0646\u06cc\u062f.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo systemctl restart nginx<\/code><\/pre>\n<\/div>\n<h5 id=\"%d8%a7%d8%b3%d8%aa%d9%82%d8%b1%d8%a7%d8%b1-%d8%a8%d8%b1%d9%86%d8%a7%d9%85%d9%87-nestjs-%d8%a8%d8%a7-%d8%a7%d8%b3%d8%aa%d9%81%d8%a7%d8%af%d9%87-%d8%a7%d8%b2-nginx\">\u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 NestJS \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 Nginx<\/h5>\n<p>\u0627\u06a9\u0646\u0648\u0646\u060c \u0645\u062f\u06cc\u0631\u06cc\u062a \u0628\u0633\u062a\u0647 pm2 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0645\u062f\u06cc\u0631\u06cc\u062a \u0627\u062c\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 NestJS \u062e\u0648\u062f \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f \u06a9\u0631\u062f. \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u06a9\u0627\u0631\u06cc \u0631\u0627 \u0628\u0647 \u062f\u0627\u06cc\u0631\u06a9\u062a\u0648\u0631\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 Nestjs \u062e\u0648\u062f \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0647\u06cc\u062f \u0648 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0627 \u062a\u0627\u06cc\u067e \u06a9\u0646\u06cc\u062f.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>pm2 start npm --name \"your_domain\" \u2013 start<\/code><\/pre>\n<\/div>\n<p>\u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0631\u0627\u06cc \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc pm2 \u0628\u0631\u0627\u06cc \u0627\u062c\u0631\u0627 \u062f\u0631 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u0645\u062c\u062f\u062f \u0633\u0631\u0648\u0631 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>pm2 startup<\/code><\/pre>\n<\/div>\n<p>\u067e\u0633 \u0627\u0632 \u0627\u062a\u0645\u0627\u0645 \u062a\u0646\u0638\u06cc\u0645 \u0628\u0631\u0646\u0627\u0645\u0647 \u062f\u0631 pm2\u060c \u0627\u062f\u0627\u0645\u0647 \u062f\u0647\u06cc\u062f \u0648 \u0644\u06cc\u0633\u062a \u0641\u0631\u0622\u06cc\u0646\u062f pm2 \u0631\u0627 \u0628\u0627 \u0645\u0648\u0627\u0631\u062f \u0632\u06cc\u0631 \u0630\u062e\u06cc\u0631\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\">pm2 save<\/pre>\n<\/div>\n<p>\u0627\u06a9\u0646\u0648\u0646\u060c \u0645\u0627 \u0628\u0631\u0646\u0627\u0645\u0647 \u0648\u0628 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0627\u062c\u0631\u0627 \u062f\u0631 \u0647\u0646\u06af\u0627\u0645 \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u062a\u0646\u0638\u06cc\u0645 \u06a9\u0631\u062f\u0647 \u0627\u06cc\u0645 \u0648 Nginx \u0631\u0627 \u0628\u0631\u0627\u06cc \u0645\u0639\u06a9\u0648\u0633 \u06a9\u0631\u062f\u0646 \u067e\u0631\u0648\u06a9\u0633\u06cc \u0628\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u0645\u0627 \u06a9\u0647 \u062f\u0631 \u0644\u0648\u06a9\u0627\u0644 \u0647\u0627\u0633\u062a \u0627\u062c\u0631\u0627 \u0645\u06cc \u0634\u0648\u062f\u060c \u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u06a9\u0631\u062f\u0647 \u0627\u06cc\u0645.<\/p>\n<h5 id=\"%d8%aa%d8%b3%d8%aa-%d9%88%d8%a8-%d8%a7%d9%be%d9%84%db%8c%da%a9%db%8c%d8%b4%d9%86\">\u062a\u0633\u062a \u0648\u0628 \u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646<\/h5>\n<p>\u0628\u0627 \u062a\u0627\u06cc\u067e \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0631\u0646\u0627\u0645\u0647 \u0648\u0628 \u0631\u0627 \u0627\u0632 \u06a9\u0646\u0633\u0648\u0644 \u062e\u0648\u062f \u062a\u0633\u062a \u06a9\u0646\u06cc\u062f.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>curl http:\/\/localhost<\/code><\/pre>\n<\/div>\n<p>\u0627\u0632 \u0622\u0646\u062c\u0627\u06cc\u06cc \u06a9\u0647 \u0645\u0627 \u067e\u0631\u0648\u06a9\u0633\u06cc \u0645\u0639\u06a9\u0648\u0633 \u0631\u0627 \u0631\u0648\u06cc \u062e\u0648\u062f \u0622\u062f\u0631\u0633 IP \u0633\u0631\u0648\u0631 \u062a\u0646\u0638\u06cc\u0645 \u06a9\u0631\u062f\u0647\u200c\u0627\u06cc\u0645\u060c \u0647\u0631 \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u06cc \u0628\u0631\u0627\u06cc \u0622\u062f\u0631\u0633 IP \u0639\u0645\u0648\u0645\u06cc \u0633\u0631\u0648\u0631\u060c \u062f\u0627\u0645\u0646\u0647\u060c \u06cc\u0627 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0631\u0648\u06cc \u0645\u06cc\u0632\u0628\u0627\u0646 \u0645\u062d\u0644\u06cc \u0627\u0632 \u0633\u0631\u0648\u0631\u060c \u0628\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 <code>NestsJS your_domain<\/code> \u0647\u062f\u0627\u06cc\u062a \u0645\u06cc\u200c\u0634\u0648\u062f.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>OutputHello World!<\/code><\/pre>\n<\/div>\n<p>\u062f\u0631 \u0628\u062e\u0634 \u0628\u0639\u062f\u06cc \u06cc\u0627\u062f \u0645\u06cc \u06af\u06cc\u0631\u06cc\u062f \u06a9\u0647 SSL \u0631\u0627 \u0628\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u062e\u0648\u062f \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u0628\u0647 \u0634\u0645\u0627 \u0627\u0645\u06a9\u0627\u0646 \u0645\u06cc \u062f\u0647\u062f \u0627\u0632 \u067e\u0631\u0648\u062a\u06a9\u0644 HTTPS \u0628\u0631\u0627\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0647\u0627\u06cc \u062e\u0648\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-3-%d8%a7%d9%81%d8%b2%d9%88%d8%af%d9%86-ssl-%d8%a8%d8%a7-%d8%a7%d8%b3%d8%aa%d9%81%d8%a7%d8%af%d9%87-%d8%a7%d8%b2-lets-encrypt-%d8%a7%d8%ae%d8%aa%db%8c\">\u0645\u0631\u062d\u0644\u0647 3 &#8211; \u0627\u0641\u0632\u0648\u062f\u0646 SSL \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 Let\u2019s Encrypt (\u0627\u062e\u062a\u06cc\u0627\u0631\u06cc)<\/h2>\n<p>\u062a\u0627\u06a9\u0646\u0648\u0646\u060c \u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 NestJS \u06a9\u0627\u0645\u0644\u0627\u064b \u06a9\u0627\u0631\u0622\u0645\u062f \u0631\u0627 \u0628\u0627 \u0633\u0631\u0648\u0631 Nginx \u06cc\u0627\u062f \u06af\u0631\u0641\u062a\u0647\u200c\u0627\u06cc\u062f. \u0628\u0627 \u0627\u06cc\u0646 \u062d\u0627\u0644\u060c \u0627\u06cc\u0646 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u0627\u0632 \u067e\u0631\u0648\u062a\u06a9\u0644 HTTP \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f \u06a9\u0647 \u0628\u0647 \u062f\u0644\u06cc\u0644 \u0622\u0633\u06cc\u0628 \u067e\u0630\u06cc\u0631\u06cc \u0628\u0647\u0631\u0647 \u0628\u0631\u062f\u0627\u0631\u06cc \u062f\u0631 \u062a\u0648\u0644\u06cc\u062f \u062a\u0648\u0635\u06cc\u0647 \u0646\u0645\u06cc \u0634\u0648\u062f. \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646\u060c \u0634\u0645\u0627 \u0645\u06cc \u062e\u0648\u0627\u0647\u06cc\u062f \u0628\u0647 \u067e\u0631\u0648\u062a\u06a9\u0644 HTTPS \u06a9\u0647 \u0646\u0633\u062e\u0647 \u0631\u0645\u0632\u06af\u0630\u0627\u0631\u06cc \u0634\u062f\u0647 HTTP \u0627\u0633\u062a\u060c \u0628\u0631\u0648\u06cc\u062f. HTTPS \u0627\u0632 \u06af\u0648\u0627\u0647\u06cc\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc SSL\/TLS \u0627\u0631\u0627\u0626\u0647 \u0634\u062f\u0647 \u062a\u0648\u0633\u0637 \u06cc\u06a9 \u0645\u0631\u062c\u0639 \u0635\u062f\u0648\u0631 \u06af\u0648\u0627\u0647\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc \u06a9\u0646\u062f. \u0627\u06cc\u0646 \u06af\u0648\u0627\u0647\u06cc \u0647\u0627 \u0645\u062e\u062a\u0635 \u06cc\u06a9 \u0648\u0628 \u0633\u0627\u06cc\u062a \u0647\u0633\u062a\u0646\u062f \u0648 \u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u06cc\u0646 \u0645\u0634\u062a\u0631\u06cc \u0648 \u0633\u0631\u0648\u0631 \u0631\u0627 \u0631\u0645\u0632\u06af\u0630\u0627\u0631\u06cc \u0645\u06cc \u06a9\u0646\u0646\u062f.<\/p>\n<h5 id=\"%d9%86%d8%b5%d8%a8-certbot-cli-lets-encrypt\">\u0646\u0635\u0628 Certbot CLI Let\u2019s Encrypt<\/h5>\n<p>Let\u2019s Encrypt \u06cc\u06a9 CLI \u0628\u0631\u0627\u06cc \u0645\u062f\u06cc\u0631\u06cc\u062a \u0648 \u062e\u0648\u062f\u06a9\u0627\u0631\u0633\u0627\u0632\u06cc \u06af\u0648\u0627\u0647\u06cc\u200c\u0647\u0627\u06cc SSL \u0628\u0631\u0627\u06cc \u0645\u0635\u0631\u0641\u200c\u06a9\u0646\u0646\u062f\u06af\u0627\u0646 \u0641\u0631\u0627\u0647\u0645 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0628\u0627 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0628\u0632\u0627\u0631 \u0631\u0627 \u0646\u0635\u0628 \u06a9\u0646\u06cc\u062f:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo apt install certbot python3-certbot-nginx<\/code><\/pre>\n<\/div>\n<p>\u0627\u06cc\u0646 \u06a9\u0644\u0627\u06cc\u0646\u062a certbot \u0631\u0627 \u0631\u0648\u06cc VPS \u0627\u0648\u0628\u0648\u0646\u062a\u0648 \u0634\u0645\u0627 \u0646\u0635\u0628 \u0645\u06cc \u06a9\u0646\u062f.<\/p>\n<h5 id=\"%d9%88%d8%a7%da%a9%d8%b4%db%8c-%da%af%d9%88%d8%a7%d9%87%db%8c%d9%86%d8%a7%d9%85%d9%87-%d9%87%d8%a7%db%8c-ssl-tls-%d8%a8%d8%b1%d8%a7%db%8c-%d8%af%d8%a7%d9%85%d9%86%d9%87-%d8%b4%d9%85%d8%a7\">\u0648\u0627\u06a9\u0634\u06cc \u06af\u0648\u0627\u0647\u06cc\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc SSL\/TLS \u0628\u0631\u0627\u06cc \u062f\u0627\u0645\u0646\u0647 \u0634\u0645\u0627<\/h5>\n<p>\u0627\u06a9\u0646\u0648\u0646 \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u06af\u0648\u0627\u0647\u06cc\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc SSL \u0631\u0627 \u0628\u0631\u0627\u06cc \u062f\u0627\u0645\u0646\u0647 \u062e\u0648\u062f \u062f\u0631\u06cc\u0627\u0641\u062a \u06a9\u0646\u06cc\u062f<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo certbot --nginx -d &lt;your_domain&gt; -d &lt;www.your_domain&gt;<\/code><\/pre>\n<\/div>\n<p>\u0634\u0645\u0627 \u0628\u0627\u06cc\u062f <code>your_domain<\/code> \u0631\u0627 \u0628\u0627 \u0646\u0627\u0645 \u0648\u0627\u0642\u0639\u06cc \u062f\u0627\u0645\u0646\u0647 \u062e\u0648\u062f \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646 \u06a9\u0646\u06cc\u062f. \u0627\u06af\u0631 \u0627\u06cc\u0646 \u0627\u0648\u0644\u06cc\u0646 \u0628\u0627\u0631\u06cc \u0627\u0633\u062a \u06a9\u0647 certbot \u0631\u0627 \u0631\u0648\u06cc VPS \u062e\u0648\u062f \u0627\u062c\u0631\u0627 \u0645\u06cc \u06a9\u0646\u06cc\u062f\u060c \u0627\u0632 \u0634\u0645\u0627 \u062e\u0648\u0627\u0633\u062a\u0647 \u0645\u06cc \u0634\u0648\u062f \u0627\u06cc\u0645\u06cc\u0644 \u062e\u0648\u062f \u0631\u0627 \u0648\u0627\u0631\u062f \u06a9\u0646\u06cc\u062f \u0648 \u0628\u0627 \u0634\u0631\u0627\u06cc\u0637 \u06a9\u0627\u0631\u0628\u0631 \u0645\u0648\u0627\u0641\u0642\u062a \u06a9\u0646\u06cc\u062f. \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0644\u0627\u0632\u0645 \u0631\u0627 \u0627\u0631\u0627\u0626\u0647 \u062f\u0647\u06cc\u062f \u0648 \u0627\u062f\u0627\u0645\u0647 \u062f\u0647\u06cc\u062f.<\/p>\n<p>\u067e\u0633 \u0627\u0632 \u0646\u0635\u0628 \u06af\u0648\u0627\u0647\u06cc\u200c\u0647\u0627\u060c \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u062a\u0645\u0627\u0645 \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u200c\u0647\u0627 \u0631\u0627 \u0628\u0647 HTTPS \u0647\u062f\u0627\u06cc\u062a \u06a9\u0646\u06cc\u062f. \u062a\u0648\u0635\u06cc\u0647 \u0645\u06cc \u0634\u0648\u062f \u0628\u0631\u0627\u06cc \u0627\u0637\u0645\u06cc\u0646\u0627\u0646 \u0627\u0632 \u06cc\u06a9\u067e\u0627\u0631\u0686\u06af\u06cc \u0648\u0628 \u0633\u0627\u06cc\u062a \u062e\u0648\u062f\u060c \u062a\u0645\u0627\u0645 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0647\u0627 \u0631\u0627 \u062a\u063a\u06cc\u06cc\u0631 \u0645\u0633\u06cc\u0631 \u062f\u0647\u06cc\u062f.<\/p>\n<h2 id=\"%d9%86%d8%aa%db%8c%d8%ac%d9%87\">\u0646\u062a\u06cc\u062c\u0647<\/h2>\n<p>\u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634\u060c \u0634\u0645\u0627 \u06cc\u0627\u062f \u06af\u0631\u0641\u062a\u06cc\u062f \u06a9\u0647 \u0686\u06af\u0648\u0646\u0647 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 NestJS \u0631\u0627 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0648\u0628 \u0633\u0631\u0648\u0631 Nginx \u062f\u0631 \u06cc\u06a9 VPS \u0627\u0648\u0628\u0648\u0646\u062a\u0648 \u062f\u0631 \u062a\u0648\u0644\u06cc\u062f \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u062f\u0647\u06cc\u062f. \u0647\u0645\u0686\u0646\u06cc\u0646 \u06cc\u0627\u062f \u06af\u0631\u0641\u062a\u06cc\u062f \u06a9\u0647 \u0686\u06af\u0648\u0646\u0647 \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 NestJS \u0648 \u06cc\u06a9 \u067e\u0631\u0648\u06a9\u0633\u06cc \u0645\u0639\u06a9\u0648\u0633 \u0628\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u062e\u0648\u062f \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 Nginx \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06a9\u0646\u06cc\u062f. \u062f\u0631 \u0646\u0647\u0627\u06cc\u062a\u060c \u06cc\u0627\u062f \u06af\u0631\u0641\u062a\u06cc\u062f \u06a9\u0647 \u0686\u06af\u0648\u0646\u0647 \u06af\u0648\u0627\u0647\u06cc\u200c\u0647\u0627\u06cc SSL\/TLS \u0631\u0627 \u0628\u0631\u0627\u06cc \u062f\u0627\u0645\u0646\u0647 \u0633\u0631\u0648\u0631 \u062e\u0648\u062f \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f \u0648 \u0627\u0632 \u06cc\u06a9\u067e\u0627\u0631\u0686\u06af\u06cc \u0627\u0631\u062a\u0628\u0627\u0637\u0627\u062a \u0628\u06cc\u0646 \u0645\u0634\u062a\u0631\u06cc\u0627\u0646 \u0648 \u0633\u0631\u0648\u0631 \u062e\u0648\u062f \u0627\u0637\u0645\u06cc\u0646\u0627\u0646 \u062d\u0627\u0635\u0644 \u06a9\u0646\u06cc\u062f.<\/p>\n","protected":false},"excerpt":{"rendered":"\u0645\u0642\u062f\u0645\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0648\u0628 \u0645\u062f\u0631\u0646 \u0645\u062a\u06a9\u06cc \u0628\u0647 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 \u0645\u062d\u06a9\u0645 \u0648 \u0627\u06cc\u0645\u0646 \u0647\u0633\u062a\u0646\u062f. \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646\u060c \u0627\u06cc\u062c\u0627\u062f \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u06a9\u0647&hellip;\n","protected":false},"author":1,"featured_media":15016,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"","_yoast_wpseo_canonical":"","_yoast_wpseo_opengraph-description":"","_yoast_wpseo_opengraph-image":"","_yoast_wpseo_twitter-description":"","_yoast_wpseo_twitter-image":"","_yoast_wpseo_focuskeywords":"","_yoast_wpseo_primary_category":"193","footnotes":""},"categories":[193,352,204],"tags":[412,411,368],"class_list":{"0":"post-15005","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-tutorials","8":"category-app","9":"category-servers","10":"tag-application","11":"tag-nginx","12":"tag-ubuntu"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 NestJS \u0628\u0627 Nginx \u062f\u0631 Ubuntu VPS - \u0628\u0644\u0627\u06af ITPiran<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\/\" \/>\n<meta property=\"og:locale\" content=\"fa_IR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 NestJS \u0628\u0627 Nginx \u062f\u0631 Ubuntu VPS - \u0628\u0644\u0627\u06af ITPiran\" \/>\n<meta property=\"og:description\" content=\"\u0645\u0642\u062f\u0645\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0648\u0628 \u0645\u062f\u0631\u0646 \u0645\u062a\u06a9\u06cc \u0628\u0647 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 \u0645\u062d\u06a9\u0645 \u0648 \u0627\u06cc\u0645\u0646 \u0647\u0633\u062a\u0646\u062f. \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646\u060c \u0627\u06cc\u062c\u0627\u062f \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u06a9\u0647&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0628\u0644\u0627\u06af ITPiran\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-11T07:56:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.itpiran.net\/2024\/03\/11112346\/Nestjs.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1793\" \/>\n\t<meta property=\"og:image:height\" content=\"1110\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u0646\u0648\u0634\u062a\u0647\u200c\u0634\u062f\u0647 \u0628\u062f\u0633\u062a\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u0632\u0645\u0627\u0646 \u062a\u0642\u0631\u06cc\u0628\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u062f\u0646\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u062f\u0642\u06cc\u0642\u0647\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/person\\\/04ed27b919baca468a2273f8e4318f81\"},\"headline\":\"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 NestJS \u0628\u0627 Nginx \u062f\u0631 Ubuntu VPS\",\"datePublished\":\"2024-03-11T07:56:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\\\/\"},\"wordCount\":126,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/03\\\/11112346\\\/Nestjs.jpg\",\"keywords\":[\"application\",\"nginx\",\"Ubuntu\"],\"articleSection\":[\"\u0622\u0645\u0648\u0632\u0634\u06cc\",\"\u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646\",\"\u0633\u0631\u0648\u0631\"],\"inLanguage\":\"fa-IR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\\\/\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\\\/\",\"name\":\"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 NestJS \u0628\u0627 Nginx \u062f\u0631 Ubuntu VPS - \u0628\u0644\u0627\u06af ITPiran\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/03\\\/11112346\\\/Nestjs.jpg\",\"datePublished\":\"2024-03-11T07:56:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\\\/#breadcrumb\"},\"inLanguage\":\"fa-IR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fa-IR\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\\\/#primaryimage\",\"url\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/03\\\/11112346\\\/Nestjs.jpg\",\"contentUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/03\\\/11112346\\\/Nestjs.jpg\",\"width\":1793,\"height\":1110},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u0622\u0645\u0648\u0632\u0634\u06cc\",\"item\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/category\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 NestJS \u0628\u0627 Nginx \u062f\u0631 Ubuntu VPS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\",\"name\":\"\u0628\u0644\u0627\u06af ITPiran\",\"description\":\"\u0627\u062e\u0628\u0627\u0631 \u0648 \u0645\u0642\u0627\u0644\u0627\u062a \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fa-IR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\",\"name\":\"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\",\"alternateName\":\"ITPIran Blog\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fa-IR\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/cdn.itpiran.net\\\/2023\\\/12\\\/27150508\\\/cropped-ITPIRAN-BLOG-LOGO-2.png\",\"contentUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2023\\\/12\\\/27150508\\\/cropped-ITPIRAN-BLOG-LOGO-2.png\",\"width\":512,\"height\":512,\"caption\":\"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/person\\\/04ed27b919baca468a2273f8e4318f81\",\"name\":\"admin\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 NestJS \u0628\u0627 Nginx \u062f\u0631 Ubuntu VPS - \u0628\u0644\u0627\u06af ITPiran","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\/","og_locale":"fa_IR","og_type":"article","og_title":"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 NestJS \u0628\u0627 Nginx \u062f\u0631 Ubuntu VPS - \u0628\u0644\u0627\u06af ITPiran","og_description":"\u0645\u0642\u062f\u0645\u0647 \u0628\u0631\u0646\u0627\u0645\u0647 \u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u0648\u0628 \u0645\u062f\u0631\u0646 \u0645\u062a\u06a9\u06cc \u0628\u0647 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 \u0645\u062d\u06a9\u0645 \u0648 \u0627\u06cc\u0645\u0646 \u0647\u0633\u062a\u0646\u062f. \u0628\u0646\u0627\u0628\u0631\u0627\u06cc\u0646\u060c \u0627\u06cc\u062c\u0627\u062f \u0628\u0631\u0646\u0627\u0645\u0647\u200c\u0647\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u062f\u06cc \u06a9\u0647&hellip;","og_url":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\/","og_site_name":"\u0628\u0644\u0627\u06af ITPiran","article_published_time":"2024-03-11T07:56:11+00:00","og_image":[{"width":1793,"height":1110,"url":"https:\/\/cdn.itpiran.net\/2024\/03\/11112346\/Nestjs.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u0646\u0648\u0634\u062a\u0647\u200c\u0634\u062f\u0647 \u0628\u062f\u0633\u062a":"admin","\u0632\u0645\u0627\u0646 \u062a\u0642\u0631\u06cc\u0628\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u062f\u0646":"2 \u062f\u0642\u06cc\u0642\u0647"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\/#article","isPartOf":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\/"},"author":{"name":"admin","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/person\/04ed27b919baca468a2273f8e4318f81"},"headline":"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 NestJS \u0628\u0627 Nginx \u062f\u0631 Ubuntu VPS","datePublished":"2024-03-11T07:56:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\/"},"wordCount":126,"commentCount":0,"publisher":{"@id":"https:\/\/www.itpiran.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.itpiran.net\/2024\/03\/11112346\/Nestjs.jpg","keywords":["application","nginx","Ubuntu"],"articleSection":["\u0622\u0645\u0648\u0632\u0634\u06cc","\u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646","\u0633\u0631\u0648\u0631"],"inLanguage":"fa-IR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\/","url":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\/","name":"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 NestJS \u0628\u0627 Nginx \u062f\u0631 Ubuntu VPS - \u0628\u0644\u0627\u06af ITPiran","isPartOf":{"@id":"https:\/\/www.itpiran.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\/#primaryimage"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.itpiran.net\/2024\/03\/11112346\/Nestjs.jpg","datePublished":"2024-03-11T07:56:11+00:00","breadcrumb":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\/#breadcrumb"},"inLanguage":"fa-IR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\/"]}]},{"@type":"ImageObject","inLanguage":"fa-IR","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\/#primaryimage","url":"https:\/\/cdn.itpiran.net\/2024\/03\/11112346\/Nestjs.jpg","contentUrl":"https:\/\/cdn.itpiran.net\/2024\/03\/11112346\/Nestjs.jpg","width":1793,"height":1110},{"@type":"BreadcrumbList","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-deploy-a-nestjs-application-with-nginx-on-ubuntu-22-04-vpstesting-the-application\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.itpiran.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u0622\u0645\u0648\u0632\u0634\u06cc","item":"https:\/\/www.itpiran.net\/blog\/category\/tutorials\/"},{"@type":"ListItem","position":3,"name":"\u0646\u062d\u0648\u0647 \u0627\u0633\u062a\u0642\u0631\u0627\u0631 \u06cc\u06a9 \u0628\u0631\u0646\u0627\u0645\u0647 NestJS \u0628\u0627 Nginx \u062f\u0631 Ubuntu VPS"}]},{"@type":"WebSite","@id":"https:\/\/www.itpiran.net\/blog\/#website","url":"https:\/\/www.itpiran.net\/blog\/","name":"\u0628\u0644\u0627\u06af ITPiran","description":"\u0627\u062e\u0628\u0627\u0631 \u0648 \u0645\u0642\u0627\u0644\u0627\u062a \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646","publisher":{"@id":"https:\/\/www.itpiran.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.itpiran.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fa-IR"},{"@type":"Organization","@id":"https:\/\/www.itpiran.net\/blog\/#organization","name":"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646","alternateName":"ITPIran Blog","url":"https:\/\/www.itpiran.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"fa-IR","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdn.itpiran.net\/2023\/12\/27150508\/cropped-ITPIRAN-BLOG-LOGO-2.png","contentUrl":"https:\/\/cdn.itpiran.net\/2023\/12\/27150508\/cropped-ITPIRAN-BLOG-LOGO-2.png","width":512,"height":512,"caption":"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/person\/04ed27b919baca468a2273f8e4318f81","name":"admin","url":"https:\/\/www.itpiran.net\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.itpiran.net\/blog\/wp-json\/wp\/v2\/posts\/15005","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itpiran.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itpiran.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/wp-json\/wp\/v2\/comments?post=15005"}],"version-history":[{"count":10,"href":"https:\/\/www.itpiran.net\/blog\/wp-json\/wp\/v2\/posts\/15005\/revisions"}],"predecessor-version":[{"id":15015,"href":"https:\/\/www.itpiran.net\/blog\/wp-json\/wp\/v2\/posts\/15005\/revisions\/15015"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/wp-json\/wp\/v2\/media\/15016"}],"wp:attachment":[{"href":"https:\/\/www.itpiran.net\/blog\/wp-json\/wp\/v2\/media?parent=15005"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/wp-json\/wp\/v2\/categories?post=15005"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/wp-json\/wp\/v2\/tags?post=15005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}