{"id":645,"date":"2021-11-14T22:27:05","date_gmt":"2021-11-15T03:27:05","guid":{"rendered":"https:\/\/molecularsciences.org\/content\/?p=645"},"modified":"2024-02-08T08:42:21","modified_gmt":"2024-02-08T13:42:21","slug":"nginx-webroot","status":"publish","type":"post","link":"https:\/\/molecularsciences.org\/content\/nginx-webroot\/","title":{"rendered":"nginx webroot"},"content":{"rendered":"\n<p>Following are default locations of nginx webroot with standard installations:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Ubuntu 12.04: \/usr\/share\/nginx\/www<\/li><li>Ubuntu 14.04: \/usr\/share\/nginx\/html<\/li><li>Mac OS (brew): \/usr\/local\/var\/www<\/li><\/ul>\n\n\n\n<p>On Ubuntu 14.04, the webroot is defined in<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/etc\/nginx\/sites-enabled\/default\n<\/code><\/pre>\n\n\n\n<p>You should something like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server {\n    listen 80 default_server;\n    listen &#91;::]:80 default_server ipv6only=on;\n\n    root \/usr\/share\/nginx\/html;\n    index index.html index.htm;\n    ...\n}\n<\/code><\/pre>\n\n\n\n<p>To change the webroot, simply change root to your preferred address, for example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root \/var\/www\n<\/code><\/pre>\n\n\n\n<p>to change webroot to \/var\/www.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Following are default locations of nginx webroot with standard installations: Ubuntu 12.04: \/usr\/share\/nginx\/www Ubuntu 14.04: \/usr\/share\/nginx\/html Mac OS (brew): \/usr\/local\/var\/www On Ubuntu 14.04, the webroot is defined in You should something like: To change the webroot, simply change root to your preferred address, for example: to change webroot to \/var\/www.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[512],"tags":[],"class_list":["post-645","post","type-post","status-publish","format-standard","hentry","category-misc"],"_links":{"self":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/comments?post=645"}],"version-history":[{"count":1,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/645\/revisions"}],"predecessor-version":[{"id":646,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/posts\/645\/revisions\/646"}],"wp:attachment":[{"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/media?parent=645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/categories?post=645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/molecularsciences.org\/content\/wp-json\/wp\/v2\/tags?post=645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}