<?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>Narnio&#187; apache</title>
	<atom:link href="http://www.narnio.com/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.narnio.com</link>
	<description>A day in the life of a software engineer</description>
	<lastBuildDate>Sat, 28 Aug 2010 16:18:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Memory issues finally solved</title>
		<link>http://www.narnio.com/2009/10/24/memory-issues-finally-solved/</link>
		<comments>http://www.narnio.com/2009/10/24/memory-issues-finally-solved/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 11:13:11 +0000</pubDate>
		<dc:creator>Jongerius</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[dovecot]]></category>

		<guid isPermaLink="false">http://www.narnio.com/?p=394</guid>
		<description><![CDATA[As I posted before in &#8216;Mysterious problems with my VPS&#8217;, I recently got an increasingly unstable VPS system hosting a lot of my and my customers sites. After a lot of digging I initially presumed that Dovecot (the mail server) was responsible for the issues, as you can read in &#8216;Dovecot causing memory issues&#8217;.
Last week [...]]]></description>
			<content:encoded><![CDATA[<p>As I posted before in <a title="View the post" href="http://www.narnio.com/2009/10/15/mysterious-problems-with-my-vps/">&#8216;Mysterious problems with my VPS&#8217;</a>, I recently got an increasingly unstable VPS system hosting a lot of my and my customers sites. After a lot of digging I initially presumed that Dovecot (the mail server) was responsible for the issues, as you can read in <a title="View the post" href="http://www.narnio.com/2009/10/18/dovecot-causing-memory-issues/">&#8216;Dovecot causing memory issues&#8217;</a>.</p>
<p>Last week I did a lot of debugging on the Debian server to try and find out what was the issue. And initially it was Dovecots memory usage. After disabling this tool for a couple of days the server was still running fine. However the day after I posted the article on Dovecot the server crashed again. So I had to restart my investigation.</p>
<p>First off I had to had to get a better memory management tool, so I installed <em>Htop</em> on the server <em>(apt-get htop</em>)<em>. </em>This shows the current memory usage of each running application. After installing this I enabled all services and applications again and started running stress tests. And though Dovecot was causing some peeks in memory usage it did not keep the high memory usage after the requests where done.</p>
<p>As it turns out for some reason Apache 2.2 was using a lot of memory during peak loads. But even more frustrating it didn&#8217;t seem to release any memory any more. Which was causing issues for services that only spawn when they are being accessed like Dovecot and Postfix, which explained why both of these services crashed when the server halted.</p>
<p>After tweaking the maximum amount of servers Apache is allowed to start and the maximum amount of client threads to handle the memory usage dropped dramatically. And I am very happy to report that the server has been running again for more then a week, without any glitches.</p>
<p>Still it doesn&#8217;t explain why all of this only happened after updating my server with the latest versions and patches. But I&#8217;m glad it&#8217;s solved for now.</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.narnio.com">Narnio</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@jong-soft.com so we can take legal action immediately.]]></content:encoded>
			<wfw:commentRss>http://www.narnio.com/2009/10/24/memory-issues-finally-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dovecot causing memory issues?</title>
		<link>http://www.narnio.com/2009/10/18/dovecot-causing-memory-issues/</link>
		<comments>http://www.narnio.com/2009/10/18/dovecot-causing-memory-issues/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 18:19:49 +0000</pubDate>
		<dc:creator>Jongerius</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[dovecot]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://www.narnio.com/?p=392</guid>
		<description><![CDATA[In my previous post I mentioned that I had and still am having some serious issues with the stability of the VPS I&#8217;m running all of my websites on. Though I&#8217;m still a long way away from solving the issue, I have figured out that it is very likely caused by an upgrade of Dovecot.
Why [...]]]></description>
			<content:encoded><![CDATA[<p>In my previous post I mentioned that I had and still am having some serious issues with the stability of the VPS I&#8217;m running all of my websites on. Though I&#8217;m still a long way away from solving the issue, I have figured out that it is very likely caused by an upgrade of Dovecot.</p>
<p>Why I believe that dovecot is slowely over time eating up memory, well after I disabled it the VPS continued running without any issues. I already knew Apache 2, subversion and MySQL weren&#8217;t causing it. So I only had postfix and dovecot left to test.</p>
<p>What is truly amazing is that the website for Dovecot indicates it is low in memory consumption, hence it has no settings to limit the amount of memory allocated for Dovecot. So I still need to figure that part out, or alternatively change to a different IMAP server.</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.narnio.com">Narnio</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@jong-soft.com so we can take legal action immediately.]]></content:encoded>
			<wfw:commentRss>http://www.narnio.com/2009/10/18/dovecot-causing-memory-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mysterious problems with my VPS</title>
		<link>http://www.narnio.com/2009/10/15/mysterious-problems-with-my-vps/</link>
		<comments>http://www.narnio.com/2009/10/15/mysterious-problems-with-my-vps/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 16:32:01 +0000</pubDate>
		<dc:creator>Jongerius</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[General Rant]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://www.narnio.com/?p=390</guid>
		<description><![CDATA[I&#8217;ve heard a lot of people always say that you can&#8217;t crash/hang or break linux easily. Well then I guess I&#8217;m one of the lucky bastards that gets it done. Since a few days the VPS system I&#8217;m operating keeps hanging itself up.
Now off course it is not the fault of Linux  , but [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve heard a lot of people always say that you can&#8217;t <strong>crash/hang or break linux</strong> easily. Well then I guess I&#8217;m one of the lucky bastards that gets it done. Since a few days the VPS system I&#8217;m operating keeps hanging itself up.</p>
<p>Now off course it is not the fault of Linux <img src='http://www.narnio.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> , but with my very lacking skill. I recently did an <em>apt-get upgrade</em> command on the VPS. To my suprise it started updating with Lenny packages, whilst I could have sworn I have Etch installed. Mystery on its own, but worse yet the server now keeps hanging and breaking.</p>
<p>I figured it was a memory issue at first cause some weird service was installed that was eating it alive. So I de-installed that and it ran fine for a few days. But allas, after 3 days of running the VPS hangs itself up again. When I say hangs-up I mean that I cannot connect using SSH, the mailserver goes down. MySQL and Apache keep running though, as does postfix. So I&#8217;m still guessing it is memory, but I have no idea why my configuration is no longer working after running an <em>apt-get upgrade</em> command. Something is really wrong <img src='http://www.narnio.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> .</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.narnio.com">Narnio</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@jong-soft.com so we can take legal action immediately.]]></content:encoded>
			<wfw:commentRss>http://www.narnio.com/2009/10/15/mysterious-problems-with-my-vps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Apache 2 and SSL trouble</title>
		<link>http://www.narnio.com/2009/07/11/apache-2-and-ssl-trouble/</link>
		<comments>http://www.narnio.com/2009/07/11/apache-2-and-ssl-trouble/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 18:25:19 +0000</pubDate>
		<dc:creator>Jongerius</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[virtual host]]></category>

		<guid isPermaLink="false">http://www.narnio.com/2009/07/11/apache-2-and-ssl-trouble/</guid>
		<description><![CDATA[I&#8217;ve been playing around with a couple of corporate website&#8217;s lately. One of the things I&#8217;ve been trying to work out is creating more security for the management and webmail systems for my websites. This is also were I ran into some difficulty.
I have my own root certificate for all of my websites, so that [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around with a couple of corporate website&#8217;s lately. One of the things I&#8217;ve been trying to work out is creating more security for the management and webmail systems for my websites. This is also were I ran into some difficulty.</p>
<p>I have my own root certificate for all of my websites, so that I can sign my own certificates and use them all over the place. I only have to ask my clients to accept the root certificate and all is fine. This seems to work fine except when I tried to load them into Apache. Here&#8217;s what my problem is and was. I have multiple domains hosted on the same virtual server. Which basically means a lot of websites running under one IP-address.</p>
<p>In this setup I have several domains I want to add a SSL variant of. For example <em>webmail.domain.com</em> as well as <em>admin.domain.com</em>. And this is where it became problematic.</p>
<p>I configured this without any problems in apache. Setup a virtual host listening to port 443 and setup the listener instruction in apache. But for some reason all of my <strong>secure domains</strong> ended up using the <strong>same</strong> certificate. Which off course causes a lot of security warnings for the browsers <img src='http://www.narnio.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> . And a lot of people are having the same issue, just read the thread on <a title="Thread on SSL multiple hosts" href="http://www.howtoforge.com/forums/archive/index.php/t-1585.html" target="_blank">howtoforge.com</a>.</p>
<p>As it turns out Apache is only able to host one secure virtual host per IP-address and port combination. Which is kinda obvious since Apache cannot read the domain name until it has decrypted the SSL information, something which it cannot do until the SSL handshake with the client has been done. Hence that only one set of certificates is allowed per IP and port.</p>
<p>Long story short I ended up setting the websites up with different ports since I don&#8217;t have multiple IP-addresses to host the websites on.</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.narnio.com">Narnio</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@jong-soft.com so we can take legal action immediately.]]></content:encoded>
			<wfw:commentRss>http://www.narnio.com/2009/07/11/apache-2-and-ssl-trouble/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speeding Apache up using Compression</title>
		<link>http://www.narnio.com/2008/12/24/speeding-apache-up-using-compression/</link>
		<comments>http://www.narnio.com/2008/12/24/speeding-apache-up-using-compression/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 18:53:46 +0000</pubDate>
		<dc:creator>Jongerius</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[Website optimization]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[comperssion]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.narnio.com/?p=266</guid>
		<description><![CDATA[As of late I started to notice my little VPS server had more difficulty keeping up with the amount of data it has to sent to the webbrowsers. I knew that the amount of requests increased and after some tracking I found out that the average page size also increased.
Keep in mind the average page [...]]]></description>
			<content:encoded><![CDATA[<p>As of late I started to notice my little VPS server had more difficulty keeping up with the amount of data it has to sent to the webbrowsers. I knew that the amount of requests increased and after some tracking I found out that the average page size also increased.</p>
<p>Keep in mind the average page size is not only the size of the HTML but also adding the external CSS, JavaScript and images. Which could dramatically increase the amount of data the users are downloading. So I started looking in the compression options of <a title="Apache 2.0 documentation" href="http://httpd.apache.org/docs/2.0/" target="_blank">Apache 2.0</a></p>
<p>First I looked on the official Apache page, but as usual the data is probably available but not very user friendly. So after some testing and crashing I found out the following procedure which seems to work fine to enable compression per Virtual Host.</p>
<p>Firstly enable the module that supports compression by executing:</p>
<p><code>:&gt; ln -s /etc/apache2/mods-available/deflate.load /etc/apache2/mods-enabled/deflate.load</code></p>
<p>This will instruct Apache to load the needed library (module) for compression using GZip. The second thing you will need to do is add the following lines to every single <a title="The official documentation on Virtual Hosts" href="http://httpd.apache.org/docs/2.0/vhosts/examples.html" target="_blank">Virtual Host</a> you want to use compression on.</p>
<p><code>    &lt;Location / &gt;<br />
      SetOutputFilter DEFLATE<br />
      BrowserMatch ^Mozilla/4 gzip-only-text/html<br />
      BrowserMatch ^Mozilla/4\.0[678] no-gzip<br />
      BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html<br />
    &lt;/Location&gt;<br />
</code></p>
<p>This will enable the compression for output (everything sent to the end-user) but not for incoming requests, which in my case is enough compression for right now. It also exludes some browsers that do not support compression.</p>
<p>Now restart or reload your apache by running the statement below and your website should support compression. This will make the loading of pages faster, though the client software needs to decompress the pages from this point on.</p>
<p><code>:&gt; etc/init.d/apache2 reload</code></p>
<p>If you have any trouble enabling compression just leave a message and I&#8217;ll try and help you where I can.</p>
<hr/>Copyright &copy; 2010 <strong><a href="http://www.narnio.com">Narnio</a></strong>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@jong-soft.com so we can take legal action immediately.]]></content:encoded>
			<wfw:commentRss>http://www.narnio.com/2008/12/24/speeding-apache-up-using-compression/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
