{"id":250,"date":"2017-07-10T20:15:00","date_gmt":"2017-07-10T20:15:00","guid":{"rendered":"http:\/\/www.evermoretechnologies.com\/blog\/?p=250"},"modified":"2017-11-07T22:58:24","modified_gmt":"2017-11-07T22:58:24","slug":"a2ensite-for-nginx-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.evermoretechnologies.com\/blog\/2017\/07\/a2ensite-for-nginx-on-ubuntu\/","title":{"rendered":"a2ensite for Nginx on Ubuntu"},"content":{"rendered":"<p>a2ensite is a nice command that creates the symlink needed for an apache config file from sites-available to sites-enabled.<\/p>\n<p>Nginx doesn&#8217;t have such a command, but it is quite simple to create the symlink through bash.<\/p>\n<p>Just run this command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">sudo ln -s \/etc\/nginx\/sites-available\/mysite.com \/etc\/nginx\/sites-enabled\/<\/pre>\n<p>&nbsp;<\/p>\n<p>And reload nginx config<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">sudo service nginx reload<\/pre>\n<p>&nbsp;<\/p>\n<p>If you want to turn the site off, just remove the symlink.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">sudo rm \/etc\/sites-enabled\/mysite.com<\/pre>\n<p>&nbsp;<\/p>\n<p>That will keep the config file in sites-available so you can turn it on again if need be.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>a2ensite is a nice command that creates the symlink needed for an apache config file from sites-available to sites-enabled. Nginx doesn&#8217;t have such a command, but it is quite simple&#8230; <a href=\"https:\/\/www.evermoretechnologies.com\/blog\/2017\/07\/a2ensite-for-nginx-on-ubuntu\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9,11,13],"tags":[],"_links":{"self":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/250"}],"collection":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=250"}],"version-history":[{"count":3,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/250\/revisions"}],"predecessor-version":[{"id":282,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/250\/revisions\/282"}],"wp:attachment":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}