<input type="hidden" id="_wpnonce" name="_wpnonce" value="1fbfd39e73" /><input type="hidden" name="_wp_http_referer" value="/blog/wp-json/wp/v2/posts/3585" /><input type="hidden" id="_wpnonce" name="_wpnonce" value="1fbfd39e73" /><input type="hidden" name="_wp_http_referer" value="/blog/wp-json/wp/v2/posts/3585" />{"id":3585,"date":"2015-07-03T15:56:27","date_gmt":"2015-07-03T05:56:27","guid":{"rendered":"https:\/\/www.businesslegions.com\/blog\/?p=3585"},"modified":"2015-07-03T15:56:27","modified_gmt":"2015-07-03T05:56:27","slug":"changing-default-index-file-vestacp-hosting","status":"publish","type":"post","link":"https:\/\/www.businesslegions.com\/blog\/2015\/07\/03\/changing-default-index-file-vestacp-hosting\/","title":{"rendered":"Changing the default index file in VestaCP hosting"},"content":{"rendered":"<!--CusAds0--><p>I had to launch a new website and needed to display the index.html file instead of the default index.php file.<\/p>\n<p>The index.html file is use as a coming soon page whereas the index.php is part of the Content Management System. In order to resolve this issue I had to use these steps:<\/p>\n<p>NOTE: I use CentOS with nginx so these steps may be different for you<\/p>\n<p>1. Locate your httpd.conf file. In my case it was located in \/home\/admin\/conf\/web<\/p>\n<p>2. Open the httpd.conf file and go to the section that has VirtualHost and find the relevant website address. eg if your website is businesslegions.com then go to that section.<\/p>\n<p>Example:<\/p>\n<div id=\"wpshdo_1\" class=\"wp-synhighlighter-outer\"><div id=\"wpshdt_1\" class=\"wp-synhighlighter-expanded\"><table border=\"0\" width=\"100%\"><tr><td align=\"left\" width=\"80%\"><a name=\"#codesyntax_1\"><\/a><a id=\"wpshat_1\" class=\"wp-synhighlighter-title\" href=\"#codesyntax_1\"  onClick=\"javascript:wpsh_toggleBlock(1)\" title=\"Click to show\/hide code block\">Source code<\/a><\/td><td align=\"right\"><a href=\"#codesyntax_1\" onClick=\"javascript:wpsh_code(1)\" title=\"Show code only\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/code.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"#codesyntax_1\" onClick=\"javascript:wpsh_print(1)\" title=\"Print code\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/printer.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"https:\/\/www.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/About.html\" target=\"_blank\" title=\"Show plugin information\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/info.gif?strip=all&w=960\" \/><\/a>&nbsp;<\/td><\/tr><\/table><\/div><div id=\"wpshdi_1\" class=\"wp-synhighlighter-inner\" style=\"display: block;\"><pre class=\"php\" style=\"font-family:monospace;\"><span class=\"sy0\">&lt;<\/span>VirtualHost 10<span class=\"sy0\">.<\/span>10<span class=\"sy0\">.<\/span>10<span class=\"sy0\">.<\/span>10<span class=\"sy0\">:<\/span><span class=\"nu0\">8080<\/span><span class=\"sy0\">&gt;<\/span>\n&nbsp;\nServerName businesslegions<span class=\"sy0\">.<\/span>com\nServerAlias www<span class=\"sy0\">.<\/span>businesslegions<span class=\"sy0\">.<\/span>com\nServerAdmin info<span class=\"sy0\">@<\/span>businesslegions<span class=\"sy0\">.<\/span>com\nDocumentRoot <span class=\"sy0\">\/<\/span>home<span class=\"sy0\">\/<\/span>admin<span class=\"sy0\">\/<\/span>web<span class=\"sy0\">\/<\/span>businesslegions<span class=\"sy0\">.<\/span>com<span class=\"sy0\">\/<\/span>public_html\nScriptAlias <span class=\"sy0\">\/<\/span>cgi<span class=\"sy0\">-<\/span>bin<span class=\"sy0\">\/<\/span> <span class=\"sy0\">\/<\/span>home<span class=\"sy0\">\/<\/span>admin<span class=\"sy0\">\/<\/span>web<span class=\"sy0\">\/<\/span>businesslegions<span class=\"sy0\">.<\/span>com<span class=\"sy0\">\/<\/span>cgi<span class=\"sy0\">-<\/span>bin<span class=\"sy0\">\/<\/span>\nAlias <span class=\"sy0\">\/<\/span>vstats<span class=\"sy0\">\/<\/span> <span class=\"sy0\">\/<\/span>home<span class=\"sy0\">\/<\/span>admin<span class=\"sy0\">\/<\/span>web<span class=\"sy0\">\/<\/span>businesslegions<span class=\"sy0\">.<\/span>com<span class=\"sy0\">\/<\/span>stats<span class=\"sy0\">\/<\/span>\nAlias <span class=\"sy0\">\/<\/span>error<span class=\"sy0\">\/<\/span> <span class=\"sy0\">\/<\/span>home<span class=\"sy0\">\/<\/span>admin<span class=\"sy0\">\/<\/span>web<span class=\"sy0\">\/<\/span>businesslegions<span class=\"sy0\">.<\/span>com<span class=\"sy0\">\/<\/span>document_errors<span class=\"sy0\">\/<\/span>\n<span class=\"co2\">#SuexecUserGroup admin admin\n<\/span>CustomLog <span class=\"sy0\">\/<\/span><span class=\"kw2\">var<\/span><span class=\"sy0\">\/<\/span><a href=\"http:\/\/www.php.net\/log\"><span class=\"kw3\">log<\/span><\/a><span class=\"sy0\">\/<\/span>httpd<span class=\"sy0\">\/<\/span>domains<span class=\"sy0\">\/<\/span>businesslegions<span class=\"sy0\">.<\/span>com<span class=\"sy0\">.<\/span>bytes bytes\nCustomLog <span class=\"sy0\">\/<\/span><span class=\"kw2\">var<\/span><span class=\"sy0\">\/<\/span><a href=\"http:\/\/www.php.net\/log\"><span class=\"kw3\">log<\/span><\/a><span class=\"sy0\">\/<\/span>httpd<span class=\"sy0\">\/<\/span>domains<span class=\"sy0\">\/<\/span>businesslegions<span class=\"sy0\">.<\/span>com<span class=\"sy0\">.<\/span><a href=\"http:\/\/www.php.net\/log\"><span class=\"kw3\">log<\/span><\/a> combined\nErrorLog <span class=\"sy0\">\/<\/span><span class=\"kw2\">var<\/span><span class=\"sy0\">\/<\/span><a href=\"http:\/\/www.php.net\/log\"><span class=\"kw3\">log<\/span><\/a><span class=\"sy0\">\/<\/span>httpd<span class=\"sy0\">\/<\/span>domains<span class=\"sy0\">\/<\/span>businesslegions<span class=\"sy0\">.<\/span>com<span class=\"sy0\">.<\/span>error<span class=\"sy0\">.<\/span><a href=\"http:\/\/www.php.net\/log\"><span class=\"kw3\">log<\/span><\/a>\n<span class=\"sy0\">&lt;<\/span>Directory <span class=\"sy0\">\/<\/span>home<span class=\"sy0\">\/<\/span>admin<span class=\"sy0\">\/<\/span>web<span class=\"sy0\">\/<\/span>businesslegions<span class=\"sy0\">.<\/span>com<span class=\"sy0\">\/<\/span>public_html<span class=\"sy0\">&gt;<\/span>\nAllowOverride All\nOptions <span class=\"sy0\">+<\/span>Includes <span class=\"sy0\">-<\/span>Indexes <span class=\"sy0\">+<\/span>ExecCGI\n<span class=\"sy0\">&lt;\/<\/span>Directory<span class=\"sy0\">&gt;<\/span>\n<span class=\"sy0\">&lt;<\/span>Directory <span class=\"sy0\">\/<\/span>home<span class=\"sy0\">\/<\/span>admin<span class=\"sy0\">\/<\/span>web<span class=\"sy0\">\/<\/span>businesslegions<span class=\"sy0\">.<\/span>com<span class=\"sy0\">\/<\/span>stats<span class=\"sy0\">&gt;<\/span>\nAllowOverride All\n<span class=\"sy0\">&lt;\/<\/span>Directory<span class=\"sy0\">&gt;<\/span><\/pre><\/div><\/div>\n<p>3. What you need to do now is add the following line:<\/p><!--CusAds0-->\n<div id=\"wpshdo_2\" class=\"wp-synhighlighter-outer\"><div id=\"wpshdt_2\" class=\"wp-synhighlighter-expanded\"><table border=\"0\" width=\"100%\"><tr><td align=\"left\" width=\"80%\"><a name=\"#codesyntax_2\"><\/a><a id=\"wpshat_2\" class=\"wp-synhighlighter-title\" href=\"#codesyntax_2\"  onClick=\"javascript:wpsh_toggleBlock(2)\" title=\"Click to show\/hide code block\">Source code<\/a><\/td><td align=\"right\"><a href=\"#codesyntax_2\" onClick=\"javascript:wpsh_code(2)\" title=\"Show code only\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/code.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"#codesyntax_2\" onClick=\"javascript:wpsh_print(2)\" title=\"Print code\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/printer.png?strip=all&w=960\" \/><\/a>&nbsp;<a href=\"https:\/\/www.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/About.html\" target=\"_blank\" title=\"Show plugin information\"><img decoding=\"async\" border=\"0\" style=\"border: 0 none\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/plugins\/wp-synhighlight\/themes\/default\/images\/info.gif?strip=all&w=960\" \/><\/a>&nbsp;<\/td><\/tr><\/table><\/div><div id=\"wpshdi_2\" class=\"wp-synhighlighter-inner\" style=\"display: block;\"><pre class=\"php\" style=\"font-family:monospace;\">DirectoryIndex index<span class=\"sy0\">.<\/span>html index<span class=\"sy0\">.<\/span>php<\/pre><\/div><\/div>\n<p>4. This makes the webserver display\u00a0index.html first before index.php. So the final configuration should look like this:<\/p>\n<p><a href=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/07\/Default-Index.png?strip=all&w=2560\"><img decoding=\"async\" class=\"alignnone size-large wp-image-3617\" src=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/07\/Default-Index-883x579.png?strip=all\" alt=\"DirectoryIndex index.html index.php\" width=\"670\" height=\"439\" srcset=\"https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/07\/Default-Index-883x579.png?strip=all 883w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/07\/Default-Index.png?strip=all&amp;zoom=0.2&amp;resize=670%2C439 134w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/07\/Default-Index.png?strip=all&amp;zoom=0.4&amp;resize=670%2C439 268w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/07\/Default-Index.png?strip=all&amp;zoom=0.6&amp;resize=670%2C439 402w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/07\/Default-Index.png?strip=all&amp;zoom=0.8&amp;resize=670%2C439 536w, https:\/\/cdn.businesslegions.com\/blog\/wp-content\/uploads\/2015\/07\/Default-Index.png?strip=all&amp;zoom=1&amp;resize=670%2C439 670w\" sizes=\"(max-width: 670px) 100vw, 670px\" \/><\/a><\/p>\n<div class=\"lt-box\" style=\"border:1px solid #22a89f\"><div class=\"lt-box-title\" style=\"background-color:#2bd2c7;border-top:1px solid #aaede9;text-shadow:1px 1px 0 #0d3f3c\">FEEDBACK<\/div><div class=\"lt-box-content\">I hope this has helped some of you. If you need any further help then please let me know.<\/div><\/div>\n<div class=\"lt-box\" style=\"border:1px solid #1d6a9e\"><div class=\"lt-box-title\" style=\"background-color:#2485C6;border-top:1px solid #a7cee8;text-shadow:1px 1px 0 #0b283b\">DO YOU LIKE WHAT YOU'VE READ?<\/div><div class=\"lt-box-content\">Join our subscription list and receive our content right in your mailbox. If you like to receive some Great deals our Freebies then subscribe now!\r\n\r\n<p><div class=\"tnp tnp-subscription \">\n<form method=\"post\" action=\"https:\/\/www.businesslegions.com\/blog\/wp-admin\/admin-ajax.php?action=tnp&amp;na=s\">\n<input type=\"hidden\" name=\"nlang\" value=\"\">\n<div class=\"tnp-field tnp-field-firstname\"><label for=\"tnp-1\">Name<\/label>\n<input class=\"tnp-name\" type=\"text\" name=\"nn\" id=\"tnp-1\" value=\"\" placeholder=\"\"><\/div>\n<div class=\"tnp-field tnp-field-email\"><label for=\"tnp-2\">Email<\/label>\n<input class=\"tnp-email\" type=\"email\" name=\"ne\" id=\"tnp-2\" value=\"\" placeholder=\"\" required><\/div>\n<div class=\"tnp-field tnp-field-button\" style=\"text-align: left\"><input class=\"tnp-submit\" type=\"submit\" value=\"Subscribe\" style=\"\">\n<\/div>\n<\/form>\n<\/div>\n<\/p>\r\n\r\n<\/div><\/div><!--CusAds0-->\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>I had to launch a new website and needed to display the index.html file instead of the default index.php file. The index.html file is use as a coming soon page whereas the index.php is part of the Content Management System. In order to resolve this issue I had to use these steps: NOTE: I use [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3617,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[13,1680,436,1002],"class_list":["post-3585","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","tag-com","tag-httpd","tag-index","tag-php"],"_links":{"self":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/3585","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/comments?post=3585"}],"version-history":[{"count":5,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/3585\/revisions"}],"predecessor-version":[{"id":3621,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/posts\/3585\/revisions\/3621"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/media\/3617"}],"wp:attachment":[{"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/media?parent=3585"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/categories?post=3585"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.businesslegions.com\/blog\/wp-json\/wp\/v2\/tags?post=3585"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}