<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Aconiac Security Group Blog &#187; Linux</title>
	<atom:link href="http://blog.aconiac.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.aconiac.com</link>
	<description>The official Aconiac company blog</description>
	<lastBuildDate>Wed, 19 May 2010 16:12:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Removing X-Powered-By header for mod_rails</title>
		<link>http://blog.aconiac.com/2009/03/03/removing-x-powered-by-header-for-mod_rails/</link>
		<comments>http://blog.aconiac.com/2009/03/03/removing-x-powered-by-header-for-mod_rails/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 21:47:09 +0000</pubDate>
		<dc:creator>Michael Lind Mortensen</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.aconiac.com/?p=61</guid>
		<description><![CDATA[NOTE: This is a technical post regarding Apache on Linux with support for Ruby on Rails. Basic understanding of these concepts is necessary! Normally you want to make sure your server doesn&#8217;t give out any information about service versions, however mod_rails doesn&#8217;t provide any easy way of doing this within the module itself. There is [...]]]></description>
			<content:encoded><![CDATA[<p><strong>NOTE: This is a technical post regarding Apache on Linux with support for Ruby on Rails. Basic understanding of these concepts is necessary! </strong></p>
<p>Normally you want to make sure your server doesn&#8217;t give out any information about service versions, however mod_rails doesn&#8217;t provide any easy way of doing this within the module itself. There is however a fairly easy solution. Simply use mod_headers to remove the headers in Apache.</p>
<p>So how is it done? Very simple, just enable the module mod_headers and add the snippet below to httpd.conf or another included configuration file in Apache. Both actions have to be done as root of course.</p>
<p>Enable the mod_headers module <em>(This example is Linux Debian &#8211; it might be different for your system)</em></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># cd /etc/apache2/mods-available/</span>
<span style="color: #666666; font-style: italic;"># a2enmod headers</span></pre></div></div>

<p>Add these lines to httpd.conf</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Header always <span style="color: #7a0874; font-weight: bold;">unset</span> <span style="color: #ff0000;">&quot;X-Powered-By&quot;</span>
Header always <span style="color: #7a0874; font-weight: bold;">unset</span> <span style="color: #ff0000;">&quot;X-Runtime&quot;</span></pre></div></div>

<p>Restart the Apache server <em>(Again &#8211; this is Debian! It might be different for you)</em></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># apache2ctl restart</span></pre></div></div>

<p>And there you go. Try making e.g. a Nikto scan on the server and see if the headers aren&#8217;t there any more.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aconiac.com/2009/03/03/removing-x-powered-by-header-for-mod_rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
