{"id":165,"date":"2023-04-05T17:30:17","date_gmt":"2023-04-05T15:30:17","guid":{"rendered":"https:\/\/gilbert.busana.lu\/?p=165"},"modified":"2023-04-05T17:34:47","modified_gmt":"2023-04-05T15:34:47","slug":"nginx-enable-configuration","status":"publish","type":"post","link":"https:\/\/www.homeserver.lu\/?p=165","title":{"rendered":"NGINX: enable configuration"},"content":{"rendered":"\n<p>After creating a website or a reverse proxy vhost through the configuration file, the vhost has to be enabled:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>ln -s \/etc\/nginx\/sites-available\/my.domain.com \/etc\/nginx\/sites-enabled\/my.domain.com<\/code><\/pre><\/div>\n\n\n\n<p>You can test the configuration file using the following command:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>nginx -t<\/code><\/pre><\/div>\n\n\n\n<p>Do not forget to restart NGINX for the changes to be applied:<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>systemctl restart nginx<\/code><\/pre><\/div>\n\n\n\n<p><strong>ATTENTION:<\/strong><br>Always activate the vhost before generating the let&#8217;s encrypt SSL certificates. Failure to do so will result in having the default configuration file to be used which might result in the creation of two different vhosts using the same domain name. This will lead to one configuration being skipped on NGINX startup.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After creating a website or a reverse proxy vhost through the configuration file, the vhost has to be enabled: You can test the configuration file using the following command: Do not forget to restart NGINX for the changes to be applied: ATTENTION:Always activate the vhost before generating the let&#8217;s encrypt SSL certificates. Failure to do [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16,15],"tags":[],"class_list":["post-165","post","type-post","status-publish","format-standard","hentry","category-reverse-proxy","category-webserver"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts\/165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=165"}],"version-history":[{"count":3,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts\/165\/revisions"}],"predecessor-version":[{"id":169,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=\/wp\/v2\/posts\/165\/revisions\/169"}],"wp:attachment":[{"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.homeserver.lu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}