{"id":126,"date":"2009-12-09T09:57:59","date_gmt":"2009-12-09T09:57:59","guid":{"rendered":"http:\/\/blog.soton.ac.uk\/webteam\/?p=126"},"modified":"2009-12-09T09:57:59","modified_gmt":"2009-12-09T09:57:59","slug":"temporary-downtime-httpd-conf","status":"publish","type":"post","link":"https:\/\/blog.soton.ac.uk\/webteam\/2009\/12\/09\/temporary-downtime-httpd-conf\/","title":{"rendered":"Temporary downtime httpd.conf"},"content":{"rendered":"<p>If you have to offline an entire webserver for an upgrade to a complicated site, or some other reason, here&#8217;s a quick (and not too dirty) way to put up a placeholder page on ALL the virtualhosts on the server.<\/p>\n<p>Nb. These instructions are for RedHat Linux Enterprise, but the concept is easy enough to do on any UNIX.<\/p>\n<p>To prepare the placeholder: (adjust paths to suit taste)<\/p>\n<ol>\n<li>Create \/opt\/placeholder\/index.html with your placeholder message.<\/li>\n<li>Copy your \/etc\/httpd\/conf\/httpd.conf to placeholder-httpd.conf<\/li>\n<li>Edit placeholder-httpd.conf\n<ol>\n<li>Remove all lines starting with &#8220;Include&#8221;<\/li>\n<li>Remove all &lt;vitualhost&gt; blocks<\/li>\n<li>Add the following to the bottom of placeholder-httpd.conf\n<pre>&lt;VirtualHost *:80&gt;\r\n  DocumentRoot \/opt\/placeholder\r\n&lt;\/VirtualHost&gt;<\/pre>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>When you want to make this go live, shut down the normal server:<\/p>\n<pre>service httpd stop<\/pre>\n<p>And then bring up apache with our custom config:<\/p>\n<pre>\/usr\/sbin\/httpd -f \/etc\/httpd\/conf\/placeholder-httpd.conf<\/pre>\n<p>And that should serve your place holder page to any HTTP request to the server!<\/p>\n<p>When you&#8217;re done, kill the root httpd process and restart normal httpd service.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have to offline an entire webserver for an upgrade to a complicated site, or some other reason, here&#8217;s a quick (and not too dirty) way to put up a placeholder page on ALL the virtualhosts on the server. Nb. These instructions are for RedHat Linux Enterprise, but the concept is easy enough to [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[199,74],"tags":[],"class_list":["post-126","post","type-post","status-publish","format-standard","hentry","category-apache","category-tips"],"_links":{"self":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/126","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/comments?post=126"}],"version-history":[{"count":2,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/126\/revisions"}],"predecessor-version":[{"id":128,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/126\/revisions\/128"}],"wp:attachment":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/media?parent=126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/categories?post=126"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/tags?post=126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}