<?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>Simon Whatley &#187; webserver</title>
	<atom:link href="http://www.simonwhatley.co.uk/tag/webserver/feed" rel="self" type="application/rss+xml" />
	<link>http://www.simonwhatley.co.uk</link>
	<description>The opposite of every great idea is another great idea</description>
	<lastBuildDate>Wed, 02 Nov 2011 09:28:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Apache RewriteRule and query strings</title>
		<link>http://www.simonwhatley.co.uk/apache-rewriterule-and-query-strings</link>
		<comments>http://www.simonwhatley.co.uk/apache-rewriterule-and-query-strings#comments</comments>
		<pubDate>Fri, 18 Feb 2011 10:56:20 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache HTTP Server]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[SES]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[URL rewriting]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=3855</guid>
		<description><![CDATA[At first glance, the way the Apache mod_rewrite module handles query strings can be a little intimidating. mod_rewrite works by sitting on your server in a file called htaccess, and “catching” requests for URL‘s. It then checks these URL request against a series of rules and conditions you have set. If the request meets any of the rules and conditions, it applies then necessary changes to the URL, then reprocesses the request with the changes you have directed.]]></description>
			<content:encoded><![CDATA[<p>At first glance, the way the Apache <code>mod_rewrite</code> module handles query strings can be a little intimidating. <code>mod_rewrite</code> works by sitting on your server in a file called <code>htaccess</code>, and &#8220;catching&#8221; requests for <abbr title="Universal Resource Locator">URL</abbr>&#8216;s. It then checks these <abbr title="Universal Resource Locator">URL</abbr> request against a series of rules and conditions you have set. If the request meets any of the rules and conditions, it applies then necessary changes to the <abbr title="Universal Resource Locator">URL</abbr>, then reprocesses the request with the changes you have directed. Apache helpfully provides some <a href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritecond" title="Apache RewriteCond Directive" target="_blank" rel="nofollow">RewriteCond documentation</a></p>
<p>The most common mistake people make when thinking of <abbr title="Universal Resource Locator">URL</abbr> redirection with <code>mod_rewrite</code>, is they believe it creates something, or changes something. It doesn&#8217;t.</p>
<p>Here is a simple example, redirecting a page dependent upon its query string. The rewrite condition and rule looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RewriteCond %{QUERY_STRING} ^id=([0-9]*)$
RewriteRule ^page\.php$ http://www.example.com/page/%1.php [R=302,L]</pre></div></div>

<p>The rewrite condition matches a numerical ID between 0 and 9. According to the official documentation, you would expect the following behaviour:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">/page.php?id=1 -&gt; http://www.example.com/page/1.php
/page.php?id=10 -&gt; http://www.example.com/page/10.php</pre></div></div>

<p>However, if you don’t append something new, then <strong>the original query is passed through</strong> by default. This results in the following:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">/page.php?id=1 -&gt; http://www.example.com/page/1.php?id=1
/page.php?id=10 -&gt; http://www.example.com/page/10.php?id=10</pre></div></div>

<p>If you want to discard the original query string you must append an empty question mark at the end of the rule; the <strong>query string not append</strong> or <strong>query string discard</strong> flag.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RewriteCond %{QUERY_STRING} ^id=([0-9]*)$
RewriteRule ^page\.php$ http://www.example.com/page/%1.php? [R=302,L]</pre></div></div>

<p>Putting it all together, here&#8217;s a quick reference for dealing with query string in a RewriteRule.</p>
<p>Keep original query (i.e., the default behaviour)</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RewriteRule ^page\.php$ /target.php [L]
# from http://www.example.com/page.php?foo=bar
# to http://www.example.com/target.php?foo=bar</pre></div></div>

<p>Discard original query</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RewriteRule ^page\.php$ /target.php? [L]
# from http://www.example.com/page.php?foo=bar
# to http://www.example.com/target.php</pre></div></div>

<p>Replace original query</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RewriteRule ^page\.php$ /target.php?bar=baz [L]
# from http://www.example.com/page.php?foo=bar
# to http://www.example.com/target.php?bar=foo</pre></div></div>

<p>Append new query to original query</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RewriteRule ^page\.php$ /target.php?bar=baz [QSA,L]
# from http://www.example.com/page.php?foo=bar
# to http://www.example.com/target.php?foo=bar&amp;bar=foo</pre></div></div>

<p>Dave Child has created a great <a href="http://www.addedbytes.com/cheat-sheets/mod_rewrite-cheat-sheet/" title="mod_rewrite cheat sheet" target="_blank" rel="nofollow">mod_rewrite cheat sheet</a>; a one-page reference sheet, listing flags for the <code>RewriteRule</code> and <code>RewriteCond</code> directives, list of server variables, a regular expression guide and several examples of common rules.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/apache-rewriterule-and-query-strings/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Apache .htaccess query string redirects</title>
		<link>http://www.simonwhatley.co.uk/apache-htaccess-query-string-redirects</link>
		<comments>http://www.simonwhatley.co.uk/apache-htaccess-query-string-redirects#comments</comments>
		<pubDate>Thu, 17 Feb 2011 21:53:42 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache HTTP Server]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[SES]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[URL rewriting]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=3857</guid>
		<description><![CDATA[One of the most common tasks performed by Apache and htaccess is the manipulation of a URL and configuring a redirect for a specific page.]]></description>
			<content:encoded><![CDATA[<p>One of the most common tasks performed by Apache and <code>htaccess</code> is the manipulation of a <abbr title="Universal Resource Locator">URL</abbr> and configuring a redirect for a specific page. Creating a <strong>single page redirect</strong> in Apache is a simple task, which uses <code>mod_alias</code> module.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Redirect /page.php http://www.example.com/target.php</pre></div></div>

<p>More commonly, however, you&#8217;re likely to want to do a <strong>mass-redirection of pages</strong>. To accomplish this, you may use the <code>RedirectMatch</code> directive.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RedirectMatch ^/category/(.*)$ http://www.example.com/topic/$1</pre></div></div>

<p>This will redirect any page from the <code>category</code> folder to the corresponding one in <code>topic</code> folder with a convenient <strong>one-by-one redirect</strong>.</p>
<p>However, neither <code>Redirect</code> nor <code>RedirectMatch</code> allow you to specify a query string for the redirect source. In other words, the following statements are invalid and they&#8217;ll simply be ignored.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># single page redirect
Redirect /page.php?id=1  http://www.example.com/page/1
Redirect /page.php?id=10  http://www.example.com/page/10
&nbsp;
# multi-page redirect
RedirectMatch ^/page.php?id=([0-9]*)$  http://www.example.com/page/$1</pre></div></div>

<p>The solution requires a change of focus from Apache&#8217;s <code>mod_alias</code> module to the <code>mod_rewrite</code> module. Here’s an example.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RewriteEngine On
RewriteCond %{REQUEST_URI}  ^/page\.php$
RewriteCond %{QUERY_STRING} ^id=([0-9]*)$
RewriteRule ^(.*)$ http://www.example.com/page/%1.php [L,R=301]</pre></div></div>

<p>The <code>mod_rewrite</code> module uses a rule-based rewriting engine (based on a regular-expression parser) to rewrite requested <abbr title="Universal Resource Locator">URL</abbr>s on the fly. It supports an unlimited number of rules and an unlimited number of attached rule conditions for each rule, to provide a really flexible and powerful <abbr title="Universal Resource Locator">URL</abbr> manipulation mechanism. The <abbr title="Universal Resource Locator">URL</abbr> manipulations can depend on various tests, of server variables, environment variables, <abbr title="HyperText Transfer Protocol">HTTP</abbr> headers, or time stamps.</p>
<p>So what does this all mean with respect to the above example?</p>
<p>The first line enables the <code>RewriteEngine</code> module. Note that <code>mod_rewrite</code> Apache module must be installed and enabled in order to use the <code>RewriteEngine</code>.</p>
<p>The <code>RewriteCond</code> statements set all the rewrite conditions. The fourth line, the real rewrite directive, will be executed <strong>if and only if all conditions are satisfied by the current request</strong>.</p>
<p>The first condition is for the page I need to redirect. This condition is included to prevent any unexpected errors if other pages are using the ID variable. Next, I base the rewrite rule on the value for the current request&#8217;s query string. The ID value within the regular expression is &#8220;wrapped&#8221; to be able to reuse the match later as a back-reference.</p>
<p>The final line is the rewrite rule. This line looks similar to the <code>RedirectMatch</code> statement. It specifies the redirection source, then the redirection target. The value captured by the second <code>RewriteCond</code> is referenced in the target with the <code>%N</code> keyword (in this example %1). The <code>RewriteRule</code> also includes a comma-separated list of flags that should be applied to the rule. In this case, <code>L</code> stops the rewriting process immediately whilst <code>R=301</code> specifies a permanent external redirect (301 is an <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" title="HTTP Status Codes" target="_blank" rel="nofollow">HTTP Status Code</a>).</p>
<p><strong>Further reading:</strong></p>
<ul>
<li><a href="http://httpd.apache.org/docs/2.2/rewrite/" title="Apache URL rewriting guide" target="_blank" rel="nofollow">Apache URL rewriting guide</a></li>
<li><a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html" title="Apache mod_rewrite" target="_blank" rel="nofollow">Apache mod_rewrite</a></li>
<li><a href="http://httpd.apache.org/docs/2.2/mod/mod_alias.html" title="Apache mod_alias" target="_blank" rel="nofollow">Apache mod_alias</a></li>
</ul>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/apache-htaccess-query-string-redirects/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Protect Your Website from a Malicious Attack</title>
		<link>http://www.simonwhatley.co.uk/how-to-protect-your-website-from-a-malicious-attack</link>
		<comments>http://www.simonwhatley.co.uk/how-to-protect-your-website-from-a-malicious-attack#comments</comments>
		<pubDate>Mon, 18 Aug 2008 12:54:20 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Application.cfc]]></category>
		<category><![CDATA[Application.cfm]]></category>
		<category><![CDATA[attack]]></category>
		<category><![CDATA[best practice]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[cfquery]]></category>
		<category><![CDATA[cfqueryparam]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[ColdFusion Administrator]]></category>
		<category><![CDATA[cross-site scripting]]></category>
		<category><![CDATA[database server]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Manitoba]]></category>
		<category><![CDATA[Mark Kruger]]></category>
		<category><![CDATA[prevention]]></category>
		<category><![CDATA[protection]]></category>
		<category><![CDATA[raw processing]]></category>
		<category><![CDATA[RDBMS]]></category>
		<category><![CDATA[script protect]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[software releases]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Injection]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[variables]]></category>
		<category><![CDATA[vulnerability]]></category>
		<category><![CDATA[Web Application Hacker]]></category>
		<category><![CDATA[web code]]></category>
		<category><![CDATA[Web Security]]></category>
		<category><![CDATA[Web Server]]></category>
		<category><![CDATA[Web Servers]]></category>
		<category><![CDATA[webserver]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=809</guid>
		<description><![CDATA[Every seasoned developer will know that protecting your website from a hacker is a top priority, whether for your own reputation or for maintaining your company's reputation and log-term revenue prospects.]]></description>
			<content:encoded><![CDATA[<p>Every seasoned developer will know that protecting your website from a hacker is a top priority, whether for your own reputation or for maintaining your company&#8217;s reputation and log-term revenue prospects.</p>
<p><strong>Why should you be worried about security?</strong></p>
<p>The Web is changing many of the assumptions that people have historically made about computer security and publishing. As the Internet makes it possible for web servers to publish information to millions of users, it also makes it possible for computer hackers, crackers, criminals, vandals, and other &#8220;bad guys&#8221; to break into the very computers on which the web servers are running. Once subverted, web servers can be used by attackers as a launching point for conducting further attacks against users and organisations.</p>
<p>It is considerably more expensive and more time-consuming to recover from a security incident than to take preventative measures ahead of time.</p>
<p>This blog post started on the premise of protecting your website from a <a href="http://en.wikipedia.org/wiki/SQL_injection" title="Wikipedia: SQL Injection" target="_blank" rel="nofollow">SQL Injection</a> Attack. However, it is also appropriate to discuss, at a relatively high level, how to secure your server architecture and applications.</p>
<h3>Server-Level Security</h3>
<ul>
<li>Separate web- and database-servers on to different physical machines.</li>
<li>Secure the web- and database-servers with traditional techniques. Only authorised accounts should have the capabilities to run tasks on the machine. That means not giving admin-rights to the user account.</li>
<li>Keep servers up-to-date with the latest patches and software releases.</li>
<li>Minimise the number of services running on the server. This means limiting the services to only those required for the web- or database-servers to function.</li>
<li>Secure information in transit between servers. This may mean physically securing the network to prevent evesdropping via encryption or obfuscating the data amongst innocuous &#8216;noise&#8217;.</li>
<li>Secure the database server behind a firewall.</li>
</ul>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h3>Application-Level Security</h3>
<ul>
<li>Separate ColdFusion, the webserver and database server user accounts. They should never be under the same system account.</li>
<li>Create a database user specifically for your ColdFusion datasource and restrict it to only the activities required for the application. The user should not have database-owner rights, access to databases not relating to the application or access to the system tables.</li>
<li>Revoke privileges in the ColdFusion datasource definition to prevent the SQL commands <code>CREATE</code>, <code>DROP</code>, <code>GRANT</code>, <code>REVOKE</code> and <code>ALTER</code>.</li>
<li>General settings in the ColdFusion Administrator:
<ul>
<li>Check the <em>Disable access to internal ColdFusion Java components</em> option.</li>
<li>Check the <em>Enable Global Script Protection</em> option.</li>
<li>Add a <em>Missing Template Handler</em>.</li>
<li>Add a <em>Site-wide Error Handler</em>.</li>
<li>Reduce the <em>Maximum size of post data</em> from 100<abbr title="megabytes">MB</abbr>.</li>
<li>Enable <em>Timeout Requests</em>, and set to 60 seconds or less.</li>
<li>Disable <em>Robust Exception Handling</em> on production servers.</li>
</ul>
</li>
</ul>
<h3>Code-Level Security</h3>
<ul>
<li>Application.cfc &#8211; Set the <code>scriptProtect</code> Application variable to <code>true</code> to enable application-wide cross-site script protection.
</li>
<li>CFQueryParam &#8211; This tag, importantly, verifies the data type of a query parameter and, for <abbr title="Relational Database Management Systems">RDBMS</abbr>s that support bind variables, enables ColdFusion to use bind variables in the <acronym title="Structured Query Language">SQL</acronym> statement. Bind variable usage enhances performance when executing a <code>cfquery</code> statement multiple times.

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #800000;">&lt;cfquery</span> <span style="color: #0000ff;">name</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;qry&quot;</span> <span style="color: #0000ff">datasource</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;#APPLICATION.dsn#&quot;</span><span style="color: #800000;">&gt;</span></span>
SELECT column1, column2, column3
FROM tableName
WHERE column4 = <span style="color: #333333;"><span style="color: #800000;">&lt;cfqueryparam</span> <span style="color: #0000ff;">value</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;#variable1#&quot;</span> <span style="color: #0000ff">cfsqltype</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;cf_sql_bit&quot;</span> <span style="color: #0000ff;">/</span><span style="color: #800000;">&gt;</span></span>
AND column5 LIKE <span style="color: #333333;"><span style="color: #800000;">&lt;cfqueryparam</span> <span style="color: #0000ff;">value</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;%#variable2#%&quot;</span> <span style="color: #0000ff">cfsqltype</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;cf_sql_varchar&quot;</span> <span style="color: #0000ff;">maxlength</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;200&quot;</span> <span style="color: #0000ff;">/</span><span style="color: #800000;">&gt;</span></span>
AND column6 IN (<span style="color: #333333;"><span style="color: #800000;">&lt;cfqueryparam</span> <span style="color: #0000ff;">value</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;#variable3#&quot;</span> <span style="color: #0000ff">cfsqltype</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;cf_sql_integer&quot;</span> <span style="color: #0000ff">list</span><span style="color: #0000ff;">=</span><span style="color: #009900;">&quot;true&quot;</span> <span style="color: #0000ff;">/</span><span style="color: #800000;">&gt;</span></span>)
<span style="color: #333333;"><span style="color: #800000;">&lt;/cfquery&gt;</span></span></pre></div></div>

<p>There are limitations to the use of the <code>cfqueryparam</code> tag. In ColdFusion 7 for example, you cannot use them in queries using the <code>cachedWithin</code> attribute. Similarly, they cannot be used in <code>ORDER BY</code> clauses, although the use of conditional logic should resolve the need for order by variables.
</li>
<li>Functions &#8211; As a rule of thumb, validate <em>all</em> the data being passed into a query prior to it being used. ColdFusion MX 7 saw the introduction of the <code>isValid()</code> function. This function tests whether a value meets a validation or data type rule and can be used to replace a large number of type-specific functions such as <code>isArray()</code>, <code>isBinary()</code>, <code>isBoolean()</code>, <code>isDate()</code>, <code>isNumeric()</code> and <code>isSimpleValue()</code> etc.
</li>
<li>Stored Procedures &#8211; I often favour the use of stored procedures over standard queries. Not only do they add an additional level of performance, they provide an additional level of security; ColdFusion does not do any raw processing of queries in the web code, it simply passes variables down the wire to the database server.</li>
</ul>
<h3>Additional Resources</h3>
<ul>
<li>
<a href="http://www.amazon.com/Web-Security-Privacy-Commerce-2nd/dp/0596000456/ref=pd_bbs_sr_1?ie=UTF8&#038;s=books&#038;qid=1218663002&#038;sr=8-1" title="Amazon: Web Security, Privacy and Commerce" target="_blank" rel="nofollow">Web Security, Privacy and Commerce</a></li>
<li>O&#8217;Reilly&#8217;s <a href="http://www.amazon.com/Web-Application-Hackers-Handbook-Discovering/dp/0470170778/ref=pd_bbs_sr_1?ie=UTF8&#038;s=books&#038;qid=1218663073&#038;sr=1-1" title="Amazon: The Web Application Hacker's Handbook" target="_blank" rel="nofollow">The Web Application Hacker&#8217;s Handbook</a></li>
<li>Adobe&#8217;s whitepaper &#8211; <a href="http://www.adobe.com/devnet/coldfusion/articles/dev_security/coldfusion_security_cf8.pdf" title="Adobe: ColdFusion 8 Security PDF" target="_blank" rel="nofollow">ColdFusion 8 Developer Security Guidlines</a> (<abbr title="Portable Document Format">PDF</abbr>, 281k)</li>
<li>Adobe&#8217;s whitepaper &#8211; <a href="http://www.adobe.com/devnet/coldfusion/articles/dev_security/coldfusion_security_cf7.pdf" title="Adobe: ColdFusion 7 Security PDF" target="_blank" rel="nofollow">ColdFusion 7 Developer Security Guidlines</a> (<abbr title="Portable Document Format">PDF</abbr>, 217k)</li>
<li>Adobe DevNet &#8211; <a href="http://www.adobe.com/devnet/coldfusion/articles/stored_procs.html" title="Learning Stored Procedure Basics in ColdFusion 8" target="_blank" rel="nofollow">Learning Stored Procedure Basics in ColdFusion 8</a></li>
<li>0&#215;000000 # The Hacker Webzine&#8217;s article on <a href="http://www.0x000000.com/?i=610" title="The Hacker Webzine: Attacking ColdFusion" target="_blank" rel="nofollow">Attacking ColdFusion</a></li>
<li>Three part series from Mark Kruger (ColdFusion Muse) &#8211; <a title="Query String with cfqueryparam" href="http://www.coldfusionmuse.com/index.cfm/2008/7/21/query-string-with-cfqueryparam" target="_blank" rel="nofollow">Part 1</a>, <a title="Using CAST and ASCII" href="http://www.coldfusionmuse.com/index.cfm/2008/7/18/Injection-Using-CAST-And-ASCII" target="_blank" rel="nofollow">Part 2</a>, <a title="Using Order By" href="http://www.coldfusionmuse.com/index.cfm/2008/7/21/SQL-injection-using-order-by" target="_blank" rel="nofollow">Part 3</a></li>
<li>Brad Wood&#8217;s article on <a href="http://www.codersrevolution.com/index.cfm/2008/7/26/cfqueryparam-its-not-just-for-security-also-when-NOT-to-use-it" title="CFQueryParam is not just for security - When not to use it" target="_blank" rel="nofollow">CFQueryParam is not just for security</a>.</li>
</ul>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/how-to-protect-your-website-from-a-malicious-attack/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Configuring ColdFusion 8 with Apache</title>
		<link>http://www.simonwhatley.co.uk/configuring-coldfusion-8-with-apache</link>
		<comments>http://www.simonwhatley.co.uk/configuring-coldfusion-8-with-apache#comments</comments>
		<pubDate>Fri, 16 Nov 2007 09:47:30 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[administrator]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache installation]]></category>
		<category><![CDATA[Application Servers]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[ColdFusion Administrator]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[errors]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[httpd.conf]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[trouble shooting]]></category>
		<category><![CDATA[Web Servers]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=334</guid>
		<description><![CDATA[After installing ColdFusion 8 and Apache successfully you may still see an "HTTP 500 Internal Server Error" when navigating to a ColdFusion page. All is not lost, you simply need to configure, or check the configuration of Apache. Apache requires very little post installation modification, but it is always good practice to check the httpd.conf file to ensure that the ColdFusion "install" scripts did what they were supposed to do.]]></description>
			<content:encoded><![CDATA[<p>After installing ColdFusion 8 and Apache successfully you may still see an &#8220;HTTP 500 Internal Server Error&#8221; when navigating to a ColdFusion page. All is not lost, you simply need to configure, or check the configuration of Apache.</p>
<p>Apache requires very little post installation modification, but it is always good practice to check the <em>httpd.conf</em> file to ensure that the ColdFusion &#8220;install&#8221; scripts did what they were supposed to do.</p>
<p>If you haven&#8217;t confirmed that Apache is running, open your browser and point it to <a href="http://localhost/">http://localhost/</a> (unless you specified a real URL during installation). You should see the Apache test page. If you see an error, review the <a href="http://www.simonwhatley.co.uk/installing-apache-on-vista" title="Apache Installation">Apache installation steps</a> to make sure you followed all the steps correctly, and/or check your log files for more detailed errors.</p>
<p>Now we know Apache is running, but how about ColdFusion? Point your browser to the ColdFusion Administrator  found commonly at <a href="http://localhost/CFIDE/administrator/index.cfm" title="The ColdFusion Administrator" target="_blank">http://localhost/CFIDE/administrator/index.cfm</a> and see what happens. One of three possible failures could occur:</p>
<ol>
<li>Your <strong>browser prompts you to save the .cfm</strong> file to your computer. There a couple of possible resolutions to this. Firstly restart the Apache service. If this does not resolve the issue you will need to check the <em>httpd.conf</em> file to ensure that the ColdFusion module is being loaded. The file can typically be found in the <em>C:\Program Files\Apache Software Foundation\Apache2.2\conf\</em> directory.<br />
Make sure that the <code>DirectoryIndex</code> has a reference to the <code>index.cfm</code> file (i.e. the default file):<img src="http://www.simonwhatley.co.uk/blog/wp-content/uploads/2007/11/dir-module-cfm.png" alt="Apache dir_module Declaration" />Ensure that the <code>LoadModule jrun_module "C:/ColdFusion8/runtime/lib/wsconfig/1/mod_jrun22.so"</code> is also present:</p>
<p><img src="http://www.simonwhatley.co.uk/blog/wp-content/uploads/2007/11/jrun-settings.png" alt="Apache JRun Settings" /></p>
<p>If you need to edit this file, restart the Apache service after you have saved the changes.</li>
<li>You get a message that <strong>the CFIDE folder cannot be found</strong>. This is more likely to be a problem with where you placed the ColdFusion application during install. The default location is in the Apache directory (<em>C:\Program Files\Apache Software Foundation\Apache2.2\htdocs</em>), so check in the http.conf file to ensure the DocumentRoot is pointing correctly. Alternatively, copy this folder to your localhost webroot (e.g. <em>C:\WebRoot</em>) ensuring that the DocumentRoot points to your webroot (see the yellow box in the second screen-shot).</li>
<li>You get another message which probably means that you need to reinstall ColdFusion, and/or Apache!</li>
</ol>
<p>And that is it, you can start using ColdFusion and developing applications.</p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/configuring-coldfusion-8-with-apache/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

