{"id":7839,"date":"2020-03-11T18:43:12","date_gmt":"2020-03-11T15:43:12","guid":{"rendered":"http:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/"},"modified":"2023-01-19T13:58:32","modified_gmt":"2023-01-19T10:58:32","slug":"set-up-nginx-virtual-hosts-on-centos-8","status":"publish","type":"post","link":"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/","title":{"rendered":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Nginx \u043d\u0430 CentOS 8"},"content":{"rendered":"<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/unihost.com\/help\/minio.php?NGINX-logo.png\" alt=\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Nginx \u043d\u0430 CentOS 8 - Image 1\" width=\"1921\" height=\"645\" \/ title=\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Nginx \u043d\u0430 CentOS 8 - Image 1\"><\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Nginx is an open-source, high-performance web server. It is known for its stability, very simple configuration, rich feature set, and low resource consumption.<\/span><!--more--><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Nginx lets you use it as a reverse proxy, load balancer, HTTP cache, and mail proxy.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">A virtual host is an Apache term, however, is commonly used by Nginx users as well. The proper term for Nginx is \u201cserver block\u201d.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">In this tutorial we will show you how to set up Nginx Virtual Host on a CentOS 8 server.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">First let\u2019s start by ensuring your system is up-to-date.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># dnf update<\/span><\/pre>\n<h2 style=\"text-align: center;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Installing Nginx<\/span><\/h2>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># dnf install nginx<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/unihost.com\/help\/minio.php?DM_040320_H-Ml2in0.png\" alt=\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Nginx \u043d\u0430 CentOS 8 - Image 2\" width=\"1908\" height=\"988\" \/ title=\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Nginx \u043d\u0430 CentOS 8 - Image 2\"><\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Enable and start Nginx.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># systemctl start nginx<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># systemctl enable nginx<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Open your web browser and go to your server. http:\/\/<span style=\"color: #ff0000;\">server-ip<\/span>\/ you will see something like this.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/unihost.com\/help\/minio.php?DM_040320_hEQiosBB.png\" alt=\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Nginx \u043d\u0430 CentOS 8 - Image 3\" width=\"943\" height=\"442\" \/ title=\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Nginx \u043d\u0430 CentOS 8 - Image 3\"><\/span><\/p>\n<h2 style=\"text-align: center;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Creating Virtual Host<\/span><\/h2>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">By default, Nginx is configured to load all configuration files that ends with .conf from the\/etc\/nginx\/conf.d\/ directory.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># nano \/etc\/nginx\/conf.d\/<span style=\"color: #ff0000;\">example.com<\/span>.conf<\/span><br \/><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">server {<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">listen 80;<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">server_name <span style=\"color: #ff0000;\">example.com<\/span> www.<span style=\"color: #ff0000;\">example.com<\/span>;<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">root \/home\/<span style=\"color: #ff0000;\">example.com<\/span>;<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">index index.php index.html index.htm;<\/span><br \/><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">access_log \/var\/log\/nginx\/<span style=\"color: #ff0000;\">example.com<\/span>.access.log;<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">error_log \/var\/log\/nginx\/<span style=\"color: #ff0000;\">example.com<\/span>.error.log;<\/span><br \/><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">}<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Create virtual host home folder.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># mkdir -p \/home\/<span style=\"color: #ff0000;\">example.com<\/span><\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Nginx should be made the owner of that folder.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># chown -R nginx: \/home\/<span style=\"color: #ff0000;\">example.com<\/span><\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">To test the Nginx configuration, run the following command.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># nginx -t<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">nginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">nginx: configuration file \/etc\/nginx\/nginx.conf test is successful<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Restart Nginx service.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># systemctl restart nginx<\/span><\/pre>\n<h2 style=\"text-align: center;\"><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Test your Results<\/span><\/h2>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">To test Virtual host, you\u2019ll have to create a index.html file to the document root directory.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"># nano \/home\/<span style=\"color: #ff0000;\">example.com<\/span>\/index.html<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">&lt;html&gt;<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">\u00a0 \u00a0 \u00a0 \u00a0 &lt;body&gt;<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;h1&gt;Welcome to Test Page &lt;br&gt; The Virtual Host is working&lt;\/h1&gt;<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">\u00a0 \u00a0 \u00a0 \u00a0 &lt;\/body&gt;<\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">&lt;\/html&gt;<\/span><\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Go to your browser and access your server hostname. You should see the next.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/unihost.com\/help\/minio.php?DM_110320_rfd2Jfbo.png\" alt=\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Nginx \u043d\u0430 CentOS 8 - Image 4\" width=\"406\" height=\"113\" \/ title=\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Nginx \u043d\u0430 CentOS 8 - Image 4\"><\/span><br \/><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Nginx virtual hosts or server blocks are a great way to add additional websites to the same origin server. The number of configuration possibilities for a given site is nearly endless when you start modifying the virtual host configuration file to suit your site\u2019s specific needs.<\/span><\/p>\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nginx is an open-source, high-performance web server. It is known for its stability, very simple configuration, rich feature set, and low resource consumption.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[69],"tags":[58,95],"class_list":["post-7839","post","type-post","status-publish","format-standard","hentry","category-dedicated-servers-ru","tag-centos","tag-nginx"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Nginx \u043d\u0430 CentOS 8 - Unihost.FAQ<\/title>\n<meta name=\"description\" content=\"Nginx - \u044d\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u041e\u043d \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Nginx \u043d\u0430 CentOS 8 - Unihost.FAQ\" \/>\n<meta property=\"og:description\" content=\"Nginx - \u044d\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u041e\u043d \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439\" \/>\n<meta property=\"og:url\" content=\"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/\" \/>\n<meta property=\"og:site_name\" content=\"Unihost.FAQ\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/unihost\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-11T15:43:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-19T10:58:32+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/unihost.com\/help\/wp-content\/uploads\/NGINX-logo.png\" \/>\n<meta name=\"author\" content=\"Unihost Support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@unihost\" \/>\n<meta name=\"twitter:site\" content=\"@unihost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Unihost Support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/\"},\"author\":{\"name\":\"Unihost Support\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\"},\"headline\":\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Nginx \u043d\u0430 CentOS 8\",\"datePublished\":\"2020-03-11T15:43:12+00:00\",\"dateModified\":\"2023-01-19T10:58:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/\"},\"wordCount\":252,\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/#organization\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/unihost.com\/help\/wp-content\/uploads\/NGINX-logo.png\",\"keywords\":[\"CentOS\",\"Nginx\"],\"articleSection\":[\"02. \u0421\u0435\u0440\u0432\u0435\u0440\u044b\"],\"inLanguage\":\"ru\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/\",\"url\":\"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/\",\"name\":\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Nginx \u043d\u0430 CentOS 8 - Unihost.FAQ\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/unihost.com\/help\/wp-content\/uploads\/NGINX-logo.png\",\"datePublished\":\"2020-03-11T15:43:12+00:00\",\"dateModified\":\"2023-01-19T10:58:32+00:00\",\"description\":\"Nginx - \u044d\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u041e\u043d \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439\",\"breadcrumb\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/#breadcrumb\"},\"inLanguage\":\"ru\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ru\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/#primaryimage\",\"url\":\"http:\/\/unihost.com\/help\/wp-content\/uploads\/NGINX-logo.png\",\"contentUrl\":\"http:\/\/unihost.com\/help\/wp-content\/uploads\/NGINX-logo.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Unihost\",\"item\":\"https:\/\/unihost.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Help\",\"item\":\"https:\/\/unihost.com\/help\/ru\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Nginx \u043d\u0430 CentOS 8\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/#website\",\"url\":\"https:\/\/unihost.com\/help\/ru\/\",\"name\":\"Unihost.FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/unihost.com\/help\/ru\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ru\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/#organization\",\"name\":\"Unihost\",\"alternateName\":\"Unihost\",\"url\":\"https:\/\/unihost.com\/help\/ru\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"contentUrl\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"width\":300,\"height\":300,\"caption\":\"Unihost\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/ru\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/unihost\/\",\"https:\/\/x.com\/unihost\",\"https:\/\/www.instagram.com\/unihost\/?hl=en\",\"https:\/\/www.linkedin.com\/company\/unihost-com\",\"https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\",\"name\":\"Unihost Support\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru\",\"@id\":\"https:\/\/unihost.com\/help\/ru\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"caption\":\"Unihost Support\"},\"sameAs\":[\"https:\/\/unihost.com\/\"],\"url\":\"https:\/\/unihost.com\/help\/ru\/author\/support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Nginx \u043d\u0430 CentOS 8 - Unihost.FAQ","description":"Nginx - \u044d\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u041e\u043d \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439","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:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/","og_locale":"ru_RU","og_type":"article","og_title":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Nginx \u043d\u0430 CentOS 8 - Unihost.FAQ","og_description":"Nginx - \u044d\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u041e\u043d \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439","og_url":"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/","og_site_name":"Unihost.FAQ","article_publisher":"https:\/\/www.facebook.com\/unihost\/","article_published_time":"2020-03-11T15:43:12+00:00","article_modified_time":"2023-01-19T10:58:32+00:00","og_image":[{"url":"http:\/\/unihost.com\/help\/wp-content\/uploads\/NGINX-logo.png","type":"","width":"","height":""}],"author":"Unihost Support","twitter_card":"summary_large_image","twitter_creator":"@unihost","twitter_site":"@unihost","twitter_misc":{"Written by":"Unihost Support","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/#article","isPartOf":{"@id":"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/"},"author":{"name":"Unihost Support","@id":"https:\/\/unihost.com\/help\/ru\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a"},"headline":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Nginx \u043d\u0430 CentOS 8","datePublished":"2020-03-11T15:43:12+00:00","dateModified":"2023-01-19T10:58:32+00:00","mainEntityOfPage":{"@id":"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/"},"wordCount":252,"publisher":{"@id":"https:\/\/unihost.com\/help\/ru\/#organization"},"image":{"@id":"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/#primaryimage"},"thumbnailUrl":"http:\/\/unihost.com\/help\/wp-content\/uploads\/NGINX-logo.png","keywords":["CentOS","Nginx"],"articleSection":["02. \u0421\u0435\u0440\u0432\u0435\u0440\u044b"],"inLanguage":"ru"},{"@type":"WebPage","@id":"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/","url":"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/","name":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Nginx \u043d\u0430 CentOS 8 - Unihost.FAQ","isPartOf":{"@id":"https:\/\/unihost.com\/help\/ru\/#website"},"primaryImageOfPage":{"@id":"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/#primaryimage"},"image":{"@id":"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/#primaryimage"},"thumbnailUrl":"http:\/\/unihost.com\/help\/wp-content\/uploads\/NGINX-logo.png","datePublished":"2020-03-11T15:43:12+00:00","dateModified":"2023-01-19T10:58:32+00:00","description":"Nginx - \u044d\u0442\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u041e\u043d \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439","breadcrumb":{"@id":"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/#breadcrumb"},"inLanguage":"ru","potentialAction":[{"@type":"ReadAction","target":["https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/"]}]},{"@type":"ImageObject","inLanguage":"ru","@id":"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/#primaryimage","url":"http:\/\/unihost.com\/help\/wp-content\/uploads\/NGINX-logo.png","contentUrl":"http:\/\/unihost.com\/help\/wp-content\/uploads\/NGINX-logo.png"},{"@type":"BreadcrumbList","@id":"https:\/\/unihost.com\/help\/ru\/set-up-nginx-virtual-hosts-on-centos-8\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Unihost","item":"https:\/\/unihost.com\/"},{"@type":"ListItem","position":2,"name":"Help","item":"https:\/\/unihost.com\/help\/ru\/"},{"@type":"ListItem","position":3,"name":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 Nginx \u043d\u0430 CentOS 8"}]},{"@type":"WebSite","@id":"https:\/\/unihost.com\/help\/ru\/#website","url":"https:\/\/unihost.com\/help\/ru\/","name":"Unihost.FAQ","description":"","publisher":{"@id":"https:\/\/unihost.com\/help\/ru\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/unihost.com\/help\/ru\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ru"},{"@type":"Organization","@id":"https:\/\/unihost.com\/help\/ru\/#organization","name":"Unihost","alternateName":"Unihost","url":"https:\/\/unihost.com\/help\/ru\/","logo":{"@type":"ImageObject","inLanguage":"ru","@id":"https:\/\/unihost.com\/help\/ru\/#\/schema\/logo\/image\/","url":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","contentUrl":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","width":300,"height":300,"caption":"Unihost"},"image":{"@id":"https:\/\/unihost.com\/help\/ru\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/unihost\/","https:\/\/x.com\/unihost","https:\/\/www.instagram.com\/unihost\/?hl=en","https:\/\/www.linkedin.com\/company\/unihost-com","https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw"]},{"@type":"Person","@id":"https:\/\/unihost.com\/help\/ru\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a","name":"Unihost Support","image":{"@type":"ImageObject","inLanguage":"ru","@id":"https:\/\/unihost.com\/help\/ru\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","caption":"Unihost Support"},"sameAs":["https:\/\/unihost.com\/"],"url":"https:\/\/unihost.com\/help\/ru\/author\/support\/"}]}},"_links":{"self":[{"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/posts\/7839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/comments?post=7839"}],"version-history":[{"count":3,"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/posts\/7839\/revisions"}],"predecessor-version":[{"id":13678,"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/posts\/7839\/revisions\/13678"}],"wp:attachment":[{"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/media?parent=7839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/categories?post=7839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unihost.com\/help\/ru\/wp-json\/wp\/v2\/tags?post=7839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}