<?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>Ian Winter &#187; apache</title>
	<atom:link href="http://ianwinter.co.uk/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://ianwinter.co.uk</link>
	<description>Have you found the instructions yet?</description>
	<lastBuildDate>Wed, 14 Sep 2011 22:16:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Log response headers in apache</title>
		<link>http://ianwinter.co.uk/2010/11/18/log-response-headers-in-apache/</link>
		<comments>http://ianwinter.co.uk/2010/11/18/log-response-headers-in-apache/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 13:44:10 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[headers]]></category>
		<category><![CDATA[logging]]></category>

		<guid isPermaLink="false">http://ianwinter.co.uk/?p=1185</guid>
		<description><![CDATA[I&#8217;ve been working on tweaking some apache logging on a few servers and one of the things I needed to log was a response header. The response header in question is an identifier with information about where the request was served from. A quick look through the apache log docs doesn&#8217;t give any clue on [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on tweaking some apache logging on a few servers and one of the things I needed to log was a response header. The response header in question is an identifier with information about where the request was served from.</p>
<p>A quick look through the apache <a href="http://httpd.apache.org/docs/2.2/logs.html">log docs</a> doesn&#8217;t give any clue on how to do this. I details request header logging but not response. A google search also didn&#8217;t really come up with anything that useful until I stumbled on <a href="http://www.apacheweek.com/features/logfiles">an article</a> over on the  apache week site.</p>
<p>A quick modification of the httpd.conf to duplicate the &#8220;common&#8221; log entry left me with this:</p>
<p><code>LogFormat "%h %l %u %t \"%r\" %>s %b <strong>\"%{HEADER_NAME}o\"</strong>" common2<br />
</code></p>
<p>The key element is the &#8220;o&#8221;, if you have %{HEADER_NAME}i you&#8217;ll get the request header, if you have %{HEADER_NAME}o you&#8217;ll get the response header.</p>
<p>This results in the following entry in the log file:</p>
<p><code>127.0.0.1 - - [18/Nov/2010:13:37:39 +0000] "GET / HTTP/1.1" 200 31006 "<strong>HEADER_VALUE</strong>"<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2010/11/18/log-response-headers-in-apache/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Disable SSLv2</title>
		<link>http://ianwinter.co.uk/2010/11/16/disable-sslv2/</link>
		<comments>http://ianwinter.co.uk/2010/11/16/disable-sslv2/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 13:45:10 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://ianwinter.co.uk/?p=1176</guid>
		<description><![CDATA[If you&#8217;re running a site with SSL you really need to turn SSLv2 off. The file you&#8217;ll want to edit is /etc/httpd/conf.d/ssl.conf &#8211; it might be in a different location, but, shouldn&#8217;t be hard to find. The two lines you want to make sure you have are: You can also test this once you&#8217;ve made [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re running a site with SSL you really need to turn SSLv2 off. The file you&#8217;ll want to edit is /etc/httpd/conf.d/ssl.conf &#8211; it might be in a different location, but, shouldn&#8217;t be hard to find. The two lines you want to make sure you have are:</p>
<pre class="brush: plain; title: ; notranslate">
SSLProtocol -ALL +SSLv3 +TLSv1
SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM
</pre>
<p>You can also test this once you&#8217;ve made the changes:</p>
<pre class="brush: plain; title: ; notranslate">
openssl s_client –ssl2 –connect virtualhost:443
openssl s_client –ssl3 –connect virtualhost:443
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2010/11/16/disable-sslv2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Misleading PHP Error</title>
		<link>http://ianwinter.co.uk/2010/09/05/misleading-php-error/</link>
		<comments>http://ianwinter.co.uk/2010/09/05/misleading-php-error/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 19:53:33 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[short_open_tag]]></category>

		<guid isPermaLink="false">http://ianwinter.co.uk/?p=1168</guid>
		<description><![CDATA[Having done some upgrades to my server (PHP, apache) I noticed I was getting some odd errors in the apache log and one of my PHP based sites wasn&#8217;t loading. The error in the log was: Now having done some digging everything suggested the rewrite rule was wrong, or, behaving differently after the upgrade but [...]]]></description>
			<content:encoded><![CDATA[<p>Having done some upgrades to my server (PHP, apache) I noticed I was getting some odd errors in the apache log and one of my PHP based sites wasn&#8217;t loading. The error in the log was:</p>
<pre class="brush: plain; title: ; notranslate">[Sun Sep 05 20:23:40 2010] [error] [client X.X.X.X] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.</pre>
<p>Now having done some digging everything suggested the rewrite rule was wrong, or, behaving differently after the upgrade but it turned out that the problem was in fact PHP short_open_tag related.</p>
<p>My php.ini had short_open_tag = Off (which it should, but the site in question was a quick one). Changing that to On and giving apache a restart made the problem go away. When I get a chance I will make the &lt;? tags &lt;?php but it&#8217;s not a biggy right now.</p>
<p>For more on short_open_tag check <a href="http://www.php.net/manual/en/ini.core.php#ini.short-open-tag" target="_blank">the manual</a>.</p>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2010/09/05/misleading-php-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MSIE SSL Oddness</title>
		<link>http://ianwinter.co.uk/2009/10/16/msie-ssl-oddness/</link>
		<comments>http://ianwinter.co.uk/2009/10/16/msie-ssl-oddness/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 14:09:41 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[ERROR_INTERNET_SECURITY_CHANNEL_ERROR]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[msie]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://ianwinter.co.uk/?p=1083</guid>
		<description><![CDATA[Internet Explorer strikes again, sometimes. In Chrome, Firefox and Safari the problem doesn&#8217;t present. On a couple of webservers in a cluster we recently noticed the following type of error being returned randomly on images, CSS and JavaScript files when calling the page via SSL. GET ERROR_INTERNET_SECURITY_CHANNEL_ERROR image/gif https://www.domain.com/path/to/image.gif Now the majority of our SSL [...]]]></description>
			<content:encoded><![CDATA[<p>Internet Explorer strikes again, sometimes. In Chrome, Firefox and Safari the problem doesn&#8217;t present. On a couple of webservers in a cluster we recently noticed the following type of error being returned randomly on images, CSS and JavaScript files when calling the page via SSL.</p>
<p><code>GET ERROR_INTERNET_SECURITY_CHANNEL_ERROR image/gif https://www.domain.com/path/to/image.gif<br />
</code></p>
<p>Now the majority of our SSL certificates for the site in question are server out via a SSL accelerator on our Cisco LBAL&#8217;s but this site wasn&#8217;t. It was still using a cert on the local box. Having dug deeper I noticed that a couple of the servers had the following lines of code in whereas all the others didn&#8217;t. Due to the load balancing that solves the randomness side of it.</p>
<p><code>AddType application/x-x509-ca-cert .crt<br />
AddType application/x-pkcs7-crl    .crl<br />
SSLPassPhraseDialog  builtin<br />
SSLSessionCache         shmcb:/var/cache/mod_ssl/scache(512000)<br />
SSLSessionCacheTimeout  300<br />
SSLMutex default<br />
SSLRandomSeed startup file:/dev/urandom  256<br />
SSLRandomSeed connect builtin<br />
SSLCryptoDevice builtin</code></p>
<p>Something in those lines of code causes the issues, I&#8217;m stabbing in the dark that it&#8217;s the session cache as none of the others would seem to be causing the problem. I&#8217;ve not tried line by line to find the offender.</p>
<p>Hopefully that will help someone out as I found lots of results in Google but not many solutions!</p>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2009/10/16/msie-ssl-oddness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Railo, Resin, Caucho and me</title>
		<link>http://ianwinter.co.uk/2009/06/12/railo-resin-caucho-and-me/</link>
		<comments>http://ianwinter.co.uk/2009/06/12/railo-resin-caucho-and-me/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 22:06:40 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[caucho]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[railo]]></category>
		<category><![CDATA[resin]]></category>

		<guid isPermaLink="false">http://ianwinter.co.uk/?p=1023</guid>
		<description><![CDATA[I&#8217;ve finally got resin, railo and caucho playing together in a nice, no longer ripping each other&#8217;s hair, out kind of way. I have to say my biggest comment (and probably one of the more tricky things to do) is that for Railo to become a big player in trying to take away Adobe&#8217;s CF [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally got resin, railo and caucho playing together in a nice, no longer ripping each other&#8217;s hair, out kind of way. I have to say my biggest comment (and probably one of the more tricky things to do) is that for Railo to become a big player in trying to take away Adobe&#8217;s CF user base installers are going to be essential. That said railo does seem quicker on processing CFML (need to do more tests to verify that).</p>
<p>I&#8217;ve got apache 2.2.3 running on CentOS 5.3. I have railo 3.1.0.015 (not updated to 016 yet) and caucho.</p>
<p>My resin.conf has this addition (multiple times for the different domains):</p>
<p><code>&lt;host id="www.domain.co.uk" root-directory="/home/domain/public_html"&gt;<br />
&lt;host-name&gt;www.domain.co.uk&lt;/host-name&gt;<br />
&lt;host-alias&gt;domain.co.uk&lt;/host-alias&gt;<br />
&lt;web-app id="/" document-directory="."/&gt;<br />
&lt;/host&gt;</code></p>
<p>The apache virtual hosts are just normal vhosts. No extras.</p>
<p>My caucho.conf (in /etc/httpd/conf.d) looks like this:</p>
<p><code>LoadModule caucho_module /usr/lib64/httpd/modules/mod_caucho.so<br />
ResinConfigServer localhost 6800<br />
CauchoConfigCacheDirectory /tmp<br />
CauchoStatus yes<br />
&lt;Location /caucho-status&gt;<br />
SetHandler caucho-status<br />
&lt;/Location&gt;</code></p>
<p>Hopefully that might help someone out. I&#8217;m going to try and do a from scratch CentOS build guide for The Rackspace Cloud sometime next week. I&#8217;ve started migrating some sites over to the cloud server and so far not hit any issues.</p>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2009/06/12/railo-resin-caucho-and-me/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rails Setup</title>
		<link>http://ianwinter.co.uk/2009/03/23/rails-setup/</link>
		<comments>http://ianwinter.co.uk/2009/03/23/rails-setup/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 21:39:20 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[rub]]></category>

		<guid isPermaLink="false">http://ianwinter.co.uk/?p=976</guid>
		<description><![CDATA[Been playing with Rails 2.3.2.1 and Passenger 2.1.2 but had some problems upgrading from the two respective earlier versions. The key was in the fact I probably didn&#8217;t RTFM. Following the guides.rubyonrails.org I&#8217;d got as far as section 4, changing the default index but whenever I did this or tried to view the controller directly [...]]]></description>
			<content:encoded><![CDATA[<p>Been playing with Rails 2.3.2.1 and Passenger 2.1.2 but had some problems upgrading from the two respective earlier versions. The key was in the fact I probably didn&#8217;t RTFM. Following the <a href="http://guides.rubyonrails.org">guides.rubyonrails.org</a> I&#8217;d got as far as section 4, changing the default index but whenever I did this or tried to view the controller directly on my Mac (10.5.6) it just 500 errored. The key was something that a friend (<a href="https://twitter.com/neilmiddleton" target="_blank">@neilmiddleton</a>) alluded to was that the app was running in production mode. There was no errors in the log files also aiding the diagnosis.</p>
<p>Solution? Pretty simple, just add an environment variable.</p>
<p><code>ServerName rortest.local<br />
DocumentRoot "/Users/ian/Sites/rortest/public"<br />
RailsEnv development</code></p>
<p>Now I&#8217;ve got to try and write something useful rather than hello world or a blog post/view page.</p>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2009/03/23/rails-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mod_gzip is your friend</title>
		<link>http://ianwinter.co.uk/2007/01/25/modgzip-is-your-friend/</link>
		<comments>http://ianwinter.co.uk/2007/01/25/modgzip-is-your-friend/#comments</comments>
		<pubDate>Thu, 25 Jan 2007 13:15:00 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[To save bandwidth on one off the servers I look after I decided to implement mod_gzip. The server in questions is running RedHat ES3, apache 1.3.37, Coldfusion 7.0.2 and has the cPanel/WHM control panel. First off was to get mod_gzip compiled, now this can be done manually, download a pre compiled one or in my [...]]]></description>
			<content:encoded><![CDATA[<p>To save bandwidth on one off the servers I look after I decided to implement mod_gzip.</p>
<p>The server in questions is running RedHat ES3, apache 1.3.37, Coldfusion 7.0.2 and has the cPanel/WHM control panel.</p>
<p>First off was to get mod_gzip compiled, now this can be done manually, download a pre compiled one or in my case just go into WHM and rebuild apache with the mod_gzip box checked. The version it puts in is 1.3.26.1a.</p>
<p>As I&#8217;d already got Coldfusion running on this webserver the resulting httpd.conf file it creates became invalid so I had to move a few things about. To cut to the chase the order in which modules load is crucial with Coldfusion due to the was the mod_gzip and mod_jrun modules work intercepting requests. The following is my httpd.conf (abbriviated) with the relevant sections.</p>
<p><code>LoadModule ...<br />
--snip--<br />
LoadModule jrun_module /usr/local/coldfusionmx7/runtime/lib/wsconfig/1/mod_jrun.so<br />
&lt;IfModule mod_jrun.c&gt;<br />
    JRunConfig Verbose false<br />
    JRunConfig Apialloc false<br />
    JRunConfig Ssl false<br />
    JRunConfig Ignoresuffixmap false<br />
    JRunConfig Serverstore /usr/local/coldfusionmx7/runtime/lib/wsconfig/1/jrunserver.store<br />
    JRunConfig Bootstrap 127.0.0.1:51011<br />
    #JRunConfig Errorurl &lt;optionally redirect to this URL on errors&gt;<br />
    #JRunConfig ProxyRetryInterval 600<br />
    #JRunConfig ConnectTimeout 15<br />
    #JRunConfig RecvTimeout 300<br />
    #JRunConfig SendTimeout 15<br />
    AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf<br />
&lt;/IfModule&gt;<br />
LoadModule gzip_module        libexec/mod_gzip.so<br />
&lt;IfModule mod_gzip.c&gt;<br />
   mod_gzip_on Yes<br />
   mod_gzip_can_negotiate Yes<br />
   mod_gzip_static_suffix .gz<br />
   AddEncoding gzip .gz<br />
   mod_gzip_update_static No<br />
   mod_gzip_command_version '/mod_gzip_status'<br />
   mod_gzip_temp_dir /tmp<br />
   mod_gzip_keep_workfiles No<br />
   mod_gzip_minimum_file_size 500<br />
   mod_gzip_maximum_file_size 500000<br />
   mod_gzip_maximum_inmem_size 60000<br />
   mod_gzip_min_http 1000<br />
   mod_gzip_handle_methods GET POST<br />
   mod_gzip_item_exclude file .js$<br />
   mod_gzip_item_exclude file .css$<br />
   mod_gzip_item_exclude file .swf$<br />
   mod_gzip_item_exclude mime ^image/<br />
   mod_gzip_item_include file .php$<br />
   mod_gzip_item_include file .cfm$<br />
   mod_gzip_item_include file .jsp$<br />
   mod_gzip_item_exclude file .pdf$<br />
   mod_gzip_item_include file .fic$<br />
   mod_gzip_item_include file .html$<br />
   mod_gzip_item_include file .htm$<br />
   mod_gzip_item_include mime ^text/html<br />
   mod_gzip_item_include mime ^text/plain<br />
   mod_gzip_item_include mime ^text/xml<br />
#mod_gzip_item_include mime ^application/force_download$<br />
#mod_gzip_item_include mime ^application/pdf$<br />
   mod_gzip_item_include handler type-coldfusion<br />
   mod_gzip_item_include handler jrun-handler<br />
   mod_gzip_dechunk Yes<br />
#then the logging directives<br />
   LogFormat "%h %l %u %t "%V %r" %&lt;s %b mod_gzip: %{mod_gzip_result}n In:%{mo<br />
d_gzip_input_size}n -&lt; Out:%{mod_gzip_output_size}n = %{mod_gzip_compression_rat<br />
io}n pct." common_with_mod_gzip_info2<br />
   CustomLog "logs/mod_gzip.log" common_with_mod_gzip_info2<br />
   mod_gzip_add_header_count Yes<br />
   mod_gzip_send_vary On<br />
&lt;/IfModule&gt;<br />
AddType type-coldfusion .fic<br />
--snip--<br />
ClearModuleList<br />
AddModule ...<br />
--snip--<br />
AddModule mod_jrun.c<br />
AddModule mod_gzip.c</code></p>
<p>In my test case I had a page show as 18224 bytes originally which compressed down to 3956 bytes a saving of 14268 bytes or 79%! To test the compression I was using the <a href="http://www.port80software.com/tools/compresscheck.asp">port80software.com</a> compression check. You can also see <a href="http://www.port80software.com/tools/compresscheck.asp?url=flatpackedworld.co.uk%2Fblog%2F">this site&#8217;s</a> report.</p>
<p>More Information (stuff I read):</p>
<ul>
<li><a href="http://www.owensperformance.com/blog_content.cfm?articleid=206">owensperformance.com</a> &#8211; cheers Irvin!
</li>
<li><a href="http://sourceforge.net/projects/mod-gzip/">mod_gzip on sourceforge</a>
</li>
<li><a href="http://schroepl.net/projekte/mod_gzip/install.htm">How to install mod_gzip</a>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://ianwinter.co.uk/2007/01/25/modgzip-is-your-friend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

