{"id":6950,"date":"2022-10-26T17:23:02","date_gmt":"2022-10-26T17:23:02","guid":{"rendered":"https:\/\/www.geekdecoder.com\/?p=6950"},"modified":"2022-10-26T17:23:02","modified_gmt":"2022-10-26T17:23:02","slug":"add-nginx-website-to-debian-nginx-server","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2022\/10\/26\/add-nginx-website-to-debian-nginx-server\/","title":{"rendered":"Add Nginx Website to Debian\/Nginx Server"},"content":{"rendered":"<p>Add the server Block<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo nano \/etc\/nginx\/sites-available\/your_domain\n<\/pre>\n<p>Add the following configuration block, which is similar to the default, but updated for your new directory and domain name:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n\nserver {\n        listen 80;\n        listen &#x5B;::]:80;\n\n        root \/var\/www\/your_domain\/html;\n        index index.html index.htm index.nginx-debian.html;\n\n        server_name your_domain www.your_domain;\n\n        location \/ {\n                try_files $uri $uri\/ =404;\n        }\n}\n<\/pre>\n<p>Enable this server block by creating a symbolic link to your custom configuration file inside the sites-enabled directory, which Nginx reads from during startup:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsudo ln -s \/etc\/nginx\/sites-available\/your_domain \/etc\/nginx\/sites-enabled\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Add the server Block sudo nano \/etc\/nginx\/sites-available\/your_domain Add the following configuration block, which is similar to the default, but updated for your new directory and domain name: server { listen 80; listen &#x5B;::]:80; root \/var\/www\/your_domain\/html; index index.html index.htm index.nginx-debian.html; server_name your_domain www.your_domain; location \/ { try_files $uri $uri\/ =404; } } Enable this server block &#8230; <a title=\"Add Nginx Website to Debian\/Nginx Server\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2022\/10\/26\/add-nginx-website-to-debian-nginx-server\/\" aria-label=\"Read more about Add Nginx Website to Debian\/Nginx Server\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[74],"tags":[],"class_list":["post-6950","post","type-post","status-publish","format-standard","hentry","category-nginx"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/6950","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=6950"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/6950\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=6950"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=6950"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=6950"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}