{"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 to create the symlink through bash. Just run this command: sudo ln -s \/etc\/nginx\/sites-available\/mysite.com \/etc\/nginx\/sites-enabled\/ &nbsp; And reload nginx config sudo service nginx reload &nbsp;&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[9,11,13],"tags":[],"class_list":["post-250","post","type-post","status-publish","format-standard","hentry","category-server-administration","category-ubuntu","category-web-server"],"_links":{"self":[{"href":"https:\/\/www.evermoretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/250","targetHints":{"allow":["GET"]}}],"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}]}}