<?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>TechPitcher &#187; Apache</title>
	<atom:link href="http://www.techpitcher.com/category/apache/feed" rel="self" type="application/rss+xml" />
	<link>http://www.techpitcher.com</link>
	<description></description>
	<lastBuildDate>Mon, 20 Dec 2010 10:28:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Forcing www in url using Apache</title>
		<link>http://www.techpitcher.com/forcing-www-in-url-using-apache.html</link>
		<comments>http://www.techpitcher.com/forcing-www-in-url-using-apache.html#comments</comments>
		<pubDate>Wed, 21 Jan 2009 16:27:09 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=107</guid>
		<description><![CDATA[To enforce www to every url, we can use mod_rewrite module in apache.
The idea is to make only one entry point to your site e.g.
  1. www.techpitcher.com
  2. http://techpitcher.com
  3. http://techpitcher.com/index.html
  4. www.techpitcher.com/index.html
As listed above there are at least 4 ways to access the home page of the site. To make [...]]]></description>
			<content:encoded><![CDATA[<p>To enforce <code>www</code> to every url, we can use mod_rewrite module in apache.<br />
The idea is to make only one entry point to your site e.g.<br />
  1. www.techpitcher.com<br />
  2. http://techpitcher.com<br />
  3. http://techpitcher.com/index.html<br />
  4. www.techpitcher.com/index.html<br />
As listed above there are at least 4 ways to access the home page of the site. To make one access url like http://www.techpitcher.com, we need to configure apache&#8217;s configuration file.<br />
To use this method, you must have write access to your apache&#8217;s configuration file.</p>
<p>1. Open httpd.conf file. In case of Apache2, this can be a blank file.<br />
2. Verify that mod_rewrite.so moule is loaded, Then load mod_rewrite.so module.<br />
<code>LoadModule rewrite_module <module_dir_path>/mod_rewrite.so</code><br />
3. Below is piece of code which will force www in every url</p>
<pre class="brush: xml;">
&lt;VirtualHost www.techpitcher.com:80&gt;
	DocumentRoot /home/techpitcher/public_html
	ServerName www.techpitcher.com
	ServerAlias techpitcher.com
	RewriteEngine On
	RewriteCond %{HTTP_HOST} ^www\.techpitcher\.com
	RewriteRule ^/index\.html$ http://www.techpitcher.com/ [R=301,L]
	RewriteCond %{HTTP_HOST} ^techpitcher\.com
	RewriteRule ^/(.*) http://www.techpitcher.com/$1 [R=301,L]
&lt;/VirtualHost&gt;
</pre>
<p>R[=code] Redirect to new URL, with optional code. Usually you also want to stop and do the redirection immediately. To stop the rewriting you also have to provide the &#8216;L&#8217; flag. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/forcing-www-in-url-using-apache.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>java.lang.NoClassDefFoundError: org/apache/commons/codec/DecoderException</title>
		<link>http://www.techpitcher.com/javalangnoclassdeffounderror-orgapachecommonscodecdecoderexception.html</link>
		<comments>http://www.techpitcher.com/javalangnoclassdeffounderror-orgapachecommonscodecdecoderexception.html#comments</comments>
		<pubDate>Sun, 04 Jan 2009 11:39:42 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[J2ee]]></category>
		<category><![CDATA[Exception]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=99</guid>
		<description><![CDATA[I am getting following exception while using httpclient.
&#60;/p&#62;
&#60;p&#62;java.lang.NoClassDefFoundError:org/apache/commons/codec/DecoderException&#60;br&#62;
at org.apache.commons.httpclient.HttpMethodBase.&#38;amp;lt;init(HttpMethodBase.java:216)&#60;br&#62;
at org.apache.commons.httpclient.methods.GetMethod.&#38;amp;lt;init(GetMethod.java:88)&#60;/p&#62;
&#60;p&#62;

Please tell me why am I getting this exception?
]]></description>
			<content:encoded><![CDATA[<p>I am getting following exception while using httpclient.</p>
<pre class="brush: java;">&lt;/p&gt;
&lt;p&gt;java.lang.NoClassDefFoundError:org/apache/commons/codec/DecoderException&lt;br&gt;
at org.apache.commons.httpclient.HttpMethodBase.&amp;amp;lt;init(HttpMethodBase.java:216)&lt;br&gt;
at org.apache.commons.httpclient.methods.GetMethod.&amp;amp;lt;init(GetMethod.java:88)&lt;/p&gt;
&lt;p&gt;</pre>
<p>
Please tell me why am I getting this exception?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/javalangnoclassdeffounderror-orgapachecommonscodecdecoderexception.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Compression using mod_deflate in Apache</title>
		<link>http://www.techpitcher.com/compression-using-mod_deflate-in-apache.html</link>
		<comments>http://www.techpitcher.com/compression-using-mod_deflate-in-apache.html#comments</comments>
		<pubDate>Tue, 30 Sep 2008 16:28:59 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://techpitcher.com/?p=60</guid>
		<description><![CDATA[A compression filter optimizes the size of the content that you send from your web server to a user via the Internet. This will save lots of bandwidth and so the application will be a lot faster as the content will be transfered to browser pretty soon. This task can be performed by turning mod_deflate [...]]]></description>
			<content:encoded><![CDATA[<p>A compression filter optimizes the size of the content that you send from your web server to a user via the Internet. This will save lots of bandwidth and so the application will be a lot faster as the content will be transfered to browser pretty soon. This task can be performed by turning mod_deflate module on.<br />
To set mod_deflate I added following block in httpd.conf, This file can be found in <apache_home>/conf/httpd.conf.</p>
<p>1. Load <code>deflate_module</code> module. It might be commented in the beginning of the file. Uncomment if commented.  </p>
<pre class="brush: xml;">
LoadModule deflate_module modules/mod_deflate.so
</pre>
<p>2. Set compression filter</p>
<pre class="brush: xml;">
&lt;Location /&gt;
  &lt;IfModule mod_deflate.c&gt;
   SetOutputFilter DEFLATE
  # file-types indicated will not be compressed
   SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|rar|zip|pdf)$ no-gzip dont-vary
    &lt;IfModule mod_headers.c&gt;
      Header append Vary User-Agent
    &lt;/IfModule&gt;
  &lt;/IfModule&gt;
&lt;/Location&gt;
</pre>
<p>3. Create a new log file to check compression results, it can be done by placing following code in httpd.conf. You need to make sure that <code>mod_log_config</code> is included in httpd.conf.</p>
<pre class="brush: xml;">
&lt;IfModule mod_log_config.c&gt;
  &lt;IfModule mod_deflate.c&gt;
    DeflateFilterNote Input instream
    DeflateFilterNote Output outstream
    DeflateFilterNote Ratio ratio
    SetEnvIf Request_URI \.gif image-request
    SetEnvIf Request_URI \.js image-request
    SetEnvIf Request_URI \.css image-request
    LogFormat '&quot;%r&quot; %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
    CustomLog logs/deflate.log deflate env=!image-request
  &lt;/IfModule&gt;
&lt;/IfModule&gt;
</pre>
<p>I have verified compression with &#038; without ssl mode and don’t find any problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.techpitcher.com/compression-using-mod_deflate-in-apache.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

