<?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>TechniTip.Net &#187; Apache</title>
	<atom:link href="http://technitip.net/category/apache/feed" rel="self" type="application/rss+xml" />
	<link>http://technitip.net</link>
	<description>TechniTip.Net - Useful tips regarding technical stuff for things like Linux, MySQL, Apache, PHP, Linux Server, iPhone and more.</description>
	<lastBuildDate>Fri, 03 Feb 2012 18:31:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<image>
<link>http://technitip.net</link>
<url>http://technitip.net/wp-content/plugins/maxblogpress-favicon/icons/favicon-66.ico</url>
<title>TechniTip.Net</title>
</image>
		<item>
		<title>NameVirtualHost *:80 has no VirtualHosts</title>
		<link>http://technitip.net/namevirtualhost-80-has-no-virtualhosts</link>
		<comments>http://technitip.net/namevirtualhost-80-has-no-virtualhosts#comments</comments>
		<pubDate>Sat, 21 Feb 2009 18:50:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[*:80]]></category>
		<category><![CDATA[has]]></category>
		<category><![CDATA[NameVirtualHost]]></category>
		<category><![CDATA[no]]></category>
		<category><![CDATA[VirtualHosts]]></category>

		<guid isPermaLink="false">http://technitip.net/?p=691</guid>
		<description><![CDATA[If the message &#8220;NameVirtualHost *:80 has no VirtualHosts&#8221; appears during Apache start and no one of your virtual hosts is recognized  it can be solved by changing the file /etc/apache2/sites-enabled/000-default and /etc/apache2/ports.conf. Within both files I&#8217;ve changed declarations &#8220;*:80&#8243; to &#8220;*&#8221;: /etc/apache2/sites-enabled/000-default &#60;VirtualHost *&#62; /etc/apache2/ports.conf NameVirtualHost * Note that all your virtual host configurations also [...]<div style="clear: both;">
<strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/debian-lenny-50-released' rel='bookmark' title='Debian &#8220;Lenny&#8221; 5.0 Released'>Debian &#8220;Lenny&#8221; 5.0 Released</a></li>
</ol></div>]]></description>
			<content:encoded><![CDATA[<p>If the message &#8220;NameVirtualHost *:80 has no VirtualHosts&#8221; appears during Apache start and no one of your virtual hosts is recognized  it can be solved by changing the file /etc/apache2/sites-enabled/000-default and /etc/apache2/ports.conf. Within both files I&#8217;ve changed declarations &#8220;*:80&#8243; to &#8220;*&#8221;:</p>
<p><code>/etc/apache2/sites-enabled/000-default</code></p>
<p><code>&lt;VirtualHost *&gt;</code></p>
<p><code>/etc/apache2/ports.conf</code></p>
<p><code>NameVirtualHost *</code></p>
<p>Note that all your virtual host configurations also have to be defined with &#8220;&lt;VirtualHost * &gt;&#8221;.</p>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fnamevirtualhost-80-has-no-virtualhosts&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div style="clear: both;"><p><strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/debian-lenny-50-released' rel='bookmark' title='Debian &#8220;Lenny&#8221; 5.0 Released'>Debian &#8220;Lenny&#8221; 5.0 Released</a></li>
</ol></p></div>]]></content:encoded>
			<wfw:commentRss>http://technitip.net/namevirtualhost-80-has-no-virtualhosts/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto Restart Apache Graceful</title>
		<link>http://technitip.net/howto-restart-apache-graceful</link>
		<comments>http://technitip.net/howto-restart-apache-graceful#comments</comments>
		<pubDate>Sat, 24 Jan 2009 11:46:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[graceful]]></category>
		<category><![CDATA[restart]]></category>

		<guid isPermaLink="false">http://technitip.net/?p=435</guid>
		<description><![CDATA[Sometimes when changing settings in your Apache config, adding virtual hosts and so on it&#8217;s needed to reload/restart the Apache daemon. Usually this is done with: /etc/init.d/apache2 restart But there two big disadvantages using this method: If your config is invalid, Apache will shutdown and not start again Users currently accessing your server will recognize [...]<div style="clear: both;">
<strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li>
<li><a href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li>
<li><a href='http://technitip.net/apache-tuning-part-3' rel='bookmark' title='Apache Tuning Part 3'>Apache Tuning Part 3</a></li>
</ol></div>]]></description>
			<content:encoded><![CDATA[<p>Sometimes when changing settings in your Apache config, adding virtual hosts and so on it&#8217;s needed to reload/restart the Apache daemon. Usually this is done with:<br />
<code><br />
/etc/init.d/apache2 restart<br />
</code></p>
<p>But there two big disadvantages using this method:</p>
<ol>
<li>If your config is invalid, Apache will shutdown and not start again</li>
<li>Users currently accessing your server will recognize that Apache will not answer request for a short time</li>
</ol>
<p>Indeed there is a much more better method to restart the Apache &#8220;gracefully&#8221;:<br />
<code><br />
apache2ctl -t<br />
Syntax OK</code><br />
<code><br />
apache2ctl -k graceful<br />
</code><br />
The first command will tell Apache to check your config. If everything is correct, you will get &#8220;Syntax OK&#8221;, otherwise the error will be reported but Apache will still run with the old configuration.</p>
<p>The second command will tell Apache to restart gracefully with the advantage that currently open connections are not aborted and the users will not be annoyed.</p>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fhowto-restart-apache-graceful&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div style="clear: both;"><p><strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li>
<li><a href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li>
<li><a href='http://technitip.net/apache-tuning-part-3' rel='bookmark' title='Apache Tuning Part 3'>Apache Tuning Part 3</a></li>
</ol></p></div>]]></content:encoded>
			<wfw:commentRss>http://technitip.net/howto-restart-apache-graceful/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto Beautify Ugly .PHP URL&#8217;s</title>
		<link>http://technitip.net/howto-beautify-ugly-php-urls</link>
		<comments>http://technitip.net/howto-beautify-ugly-php-urls#comments</comments>
		<pubDate>Sat, 17 Jan 2009 13:16:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP/MySQL]]></category>
		<category><![CDATA[beautify]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ugly]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://technitip.net/?p=361</guid>
		<description><![CDATA[You probably know this ugly .PHP links with many parameters like http://technitip.net/test.php?param1=p1&#038;param2=p2&#038;param3=p3 I really don&#8217;t like this look. Doesn&#8217;t the following URL look much better? http://technitip.net/test/p1/p2/p3 I think yes. So here is tutorial how you can beautify your links using Apache and mod_rewrite. The Test Script We assume that mod_rewrite is loaded in your Apache [...]<div style="clear: both;">
<strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/php-accelerator' rel='bookmark' title='PHP Accelerator'>PHP Accelerator</a></li>
<li><a href='http://technitip.net/simple-php-flood-protection-class' rel='bookmark' title='Simple PHP Flood Protection Class'>Simple PHP Flood Protection Class</a></li>
<li><a href='http://technitip.net/domain-redirects' rel='bookmark' title='Domain Redirects'>Domain Redirects</a></li>
</ol></div>]]></description>
			<content:encoded><![CDATA[<p>You probably know this ugly .PHP links with many parameters like<br />
<code></p>
<p>http://technitip.net/test.php?param1=p1&#038;param2=p2&#038;param3=p3</p>
<p></code><br />
I really don&#8217;t like this look. Doesn&#8217;t the following URL look much better?<br />
<code></p>
<p>http://technitip.net/test/p1/p2/p3</p>
<p></code><br />
I think yes. So here is tutorial how you can beautify your links using Apache and mod_rewrite.</p>
<p><strong>The Test Script</strong></p>
<p>We assume that mod_rewrite is loaded in your Apache config and generate a simple PHP script called &#8220;test.php&#8221;:</p>
<pre>&lt;?php
echo "Parameter 1: " . $_REQUEST['param1'] . "&lt;br /&gt;";
echo "Parameter 2: " . $_REQUEST['param2'] . "&lt;br /&gt;";
echo "Parameter 3: " . $_REQUEST['param3'] . "&lt;br /&gt;";
?&gt;</pre>
<p>This script gets the parameters param1, param2, etc. which have been given to the PHP page and prints them out. To check it we put the URL into the browser:</p>
<p>http://technitip.net/test.php?param1=p1&#038;param2=p2&#038;param3=p3</p>
<p>And get the result:</p>
<p>Parameter 1: p1<br />
Parameter 2: p2<br />
Parameter 3: p3</p>
<p><strong>Simple Rewrite</strong></p>
<p>Fine, passing parameters to our PHP script is working but still looking ugly. Now we generate a .htaccess file in the root directory of your web directory:<br />
<code><br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteRule ^(test)/?(.*)$ test.php [L,QSA,NC]<br />
</code><br />
What will happen? test.php will be redirected to test and all parameters will be parsed like before, we can test it:<br />
<code></p>
<p>http://technitip.net/test?param1=p1&#038;param2=p2&#038;param3=p3&#038;param4=p4</p>
<p></code></p>
<p><strong>First Parameter Rewrite</strong></p>
<p>Nice, but not yet what we really want. So we put another line into the .htaccess (before our first RewriteRule, not after! It&#8217;s important):<br />
<code><br />
RewriteRule ^(test)/<strong>([a-z0-9]+)(/[^/]+)?</strong>/?(.*)$ test.php?param1=$2 [L,QSA,NC]<br />
RewriteRule ^(test)/?(.*)$ test.php [L,QSA,NC]<br />
</code></p>
<p>For every parameter we need a new expression /<strong>([a-z0-9]+)(/[^/]+)?</strong>/</p>
<p>This will convert the line /test/p1 into test.php?param1=p1. Note that only the characters a-z und 0-9 are allowed as parameters. For the first parameter $2 is used.</p>
<p><strong>Second Parameter</strong></p>
<p>We repeat this step for every further parameter we need to hand over, $4 is used for the second parameter (not $3!):<br />
<code><br />
RewriteRule ^(test)/([a-z0-9]+)(/[^/]+)?/([a-z0-9]+)(/[^/]+)?/?(.*)$ test.php?param1=$2&amp;param2=$4 [L,QSA,NC]<br />
RewriteRule ^(test)/([a-z0-9]+)(/[^/]+)?/?(.*)$ test.php?param1=$2 [L,QSA,NC]<br />
RewriteRule ^(test)/?(.*)$ test.php [L,QSA,NC]<br />
</code></p>
<p><strong>Three Parameters</strong></p>
<p>Or with 3 parameters. Note: Since the .htaccess is parsed from top to bottom the rewrite rule with the highest number of parameters must be located at the top of the .htaccess. $6 is used for the third parameter!<br />
<code><br />
RewriteRule ^(test)/([a-z0-9]+)(/[^/]+)?/([a-z0-9]+)(/[^/]+)?/([a-z0-9]+)(/[^/]+)?/?(.*)$ test.php?param1=$2&amp;param2=$4&amp;param3=$6 [L,QSA,NC]<br />
RewriteRule ^(test)/([a-z0-9]+)(/[^/]+)?/([a-z0-9]+)(/[^/]+)?/?(.*)$ test.php?param1=$2&amp;param2=$4 [L,QSA,NC]<br />
RewriteRule ^(test)/([a-z0-9]+)(/[^/]+)?/?(.*)$ test.php?param1=$2 [L,QSA,NC]<br />
RewriteRule ^(test)/?(.*)$ test.php [L,QSA,NC]<br />
</code></p>
<p>We test again with 3 parameters:<br />
<code></p>
<p>http://technitip.net/test/p1/p2/p3</p>
<p></code><br />
Parameter 1: p1<br />
Parameter 2: p2<br />
Parameter 3: p3</p>
<p>Looks better, indeed.</p>
<p><strong>Hint</strong></p>
<p>Be sure you have enabled &#8220;Options FollowSymLinks&#8221; or Options &#8220;SymLinksIfOwnerMatch&#8221; in your Apache or virtual host config. Otherwise mod rewrite will not work!</p>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fhowto-beautify-ugly-php-urls&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div style="clear: both;"><p><strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/php-accelerator' rel='bookmark' title='PHP Accelerator'>PHP Accelerator</a></li>
<li><a href='http://technitip.net/simple-php-flood-protection-class' rel='bookmark' title='Simple PHP Flood Protection Class'>Simple PHP Flood Protection Class</a></li>
<li><a href='http://technitip.net/domain-redirects' rel='bookmark' title='Domain Redirects'>Domain Redirects</a></li>
</ol></p></div>]]></content:encoded>
			<wfw:commentRss>http://technitip.net/howto-beautify-ugly-php-urls/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Domain Redirects</title>
		<link>http://technitip.net/domain-redirects</link>
		<comments>http://technitip.net/domain-redirects#comments</comments>
		<pubDate>Fri, 16 Jan 2009 19:18:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[avoid]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[double]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://technitip.net/?p=353</guid>
		<description><![CDATA[Avoid Double Content There are two reasons to redirect e.g. mydomain1.de to www.mydomain1.de: It avoids detecting search machines &#8220;double content&#8221; I personally prefer having one unique URL for a homepage, also if a user enters mydomain1.de he will be redirected to www.mydomain1.de RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^mydomain\.de$ [NC] RewriteRule ^(.*) http://www.mydomain.de/$1 [L,R=301] The [...]<div style="clear: both;">
<strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/iphone-whois-tool-domain-scout' rel='bookmark' title='Whois Tool &#8220;Domain Scout&#8221; for iPhone'>Whois Tool &#8220;Domain Scout&#8221; for iPhone</a></li>
<li><a href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li>
<li><a href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li>
</ol></div>]]></description>
			<content:encoded><![CDATA[<p><strong>Avoid Double Content</strong></p>
<p>There are two reasons to redirect e.g. mydomain1.de to www.mydomain1.de:</p>
<ol>
<li>It avoids detecting search machines &#8220;double content&#8221;</li>
<li>I personally prefer having one unique URL for a homepage, also if a user enters mydomain1.de he will be redirected to www.mydomain1.de</li>
</ol>
<pre>RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} ^mydomain\.de$ [NC]
RewriteRule ^(.*) http://www.mydomain.de/$1 [L,R=301]</pre>
<p>The redirect is defined as 301 &#8220;permanent&#8221;. Please note that these rewrite settings only work if the correct setting for &#8220;AllowOverride&#8221; is done within the Apache settings of your host or virtual host configuration.</p>
<p><strong>Redirect Domain to another Domain</strong></p>
<p>If you want to redirect a complete domain, here mydomain1.de including subdomains to another domain e.g. mydomain2.de put the following code into the .htaccess of the web root directory of mydomain1.de:</p>
<pre>RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(.*)mydomain1\.de$
RewriteRule ^(.*)$ http://www.mydomain2.de/$1 [R=301,L,NC]</pre>
<p>Using this rewrite condition all hosts *.mydomain1.de including mydomain1.de will be redirected to www.mydomain2.de. Everything behind .de/ will be kept.</p>
<p>Furthermore the redirect is defined as 301 which means permanent redirect. This will avoid that search machines like Goole will treat you with &#8220;double content&#8221;.</p>
<p><strong>Hint</strong></p>
<p>Be sure you have enabled &#8220;Options FollowSymLinks&#8221; or Options &#8220;SymLinksIfOwnerMatch&#8221; in your Apache or virtual host config. Otherwise mod rewrite will not work!</p>
<p>Working with Apache/2.2.3</p>
<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fdomain-redirects&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div style="clear: both;"><p><strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/iphone-whois-tool-domain-scout' rel='bookmark' title='Whois Tool &#8220;Domain Scout&#8221; for iPhone'>Whois Tool &#8220;Domain Scout&#8221; for iPhone</a></li>
<li><a href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li>
<li><a href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li>
</ol></p></div>]]></content:encoded>
			<wfw:commentRss>http://technitip.net/domain-redirects/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Tuning Part 3</title>
		<link>http://technitip.net/apache-tuning-part-3</link>
		<comments>http://technitip.net/apache-tuning-part-3#comments</comments>
		<pubDate>Tue, 30 Dec 2008 11:18:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://planlos.org/~harry/php/?p=50</guid>
		<description><![CDATA[Some further settings which worked well for a server (1GB RAM, single CPU) with max. 120 users simultaneously and doing some video streaming. Settings are found in /etc/apache2/apache.conf Timeout 30 KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 5 &#60;IfModule mpm_prefork_module&#62; StartServers         16 ServerLimit         512 MinSpareServers      16 MaxSpareServers      128 MaxClients          256 MaxRequestsPerChild 55555 &#60;/IfModule&#62; HostnameLookups Off ServerTokens Prodme [...]<div style="clear: both;">
<strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li>
<li><a href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li>
<li><a href='http://technitip.net/mysql-performance-tips' rel='bookmark' title='MySQL Performance Tips'>MySQL Performance Tips</a></li>
</ol></div>]]></description>
			<content:encoded><![CDATA[<p>Some further settings which worked well for a server (1GB RAM, single CPU) with max. 120 users simultaneously and doing some video streaming. Settings are found in /etc/apache2/apache.conf</p>
<pre>Timeout 30

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 5

&lt;IfModule mpm_prefork_module&gt;
StartServers         16
ServerLimit         512
MinSpareServers      16
MaxSpareServers      128
MaxClients          256
MaxRequestsPerChild 55555
&lt;/IfModule&gt;

HostnameLookups Off

ServerTokens Prodme
ServerSignature Off
UseCanonicalName Off
TraceEnable Off</pre>
<p>HostNameLookups Off are recommended in any case.</p>


<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fapache-tuning-part-3&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div style="clear: both;"><p><strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li>
<li><a href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li>
<li><a href='http://technitip.net/mysql-performance-tips' rel='bookmark' title='MySQL Performance Tips'>MySQL Performance Tips</a></li>
</ol></p></div>]]></content:encoded>
			<wfw:commentRss>http://technitip.net/apache-tuning-part-3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Tuning Part 2</title>
		<link>http://technitip.net/apache-tuning-part-2</link>
		<comments>http://technitip.net/apache-tuning-part-2#comments</comments>
		<pubDate>Tue, 30 Dec 2008 11:12:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://planlos.org/~harry/php/?p=43</guid>
		<description><![CDATA[Let&#8217;s assume your web server has high disc IO. Every access to a .PHP, .HTML, .JPG, .GIF, etc wil cause a log entry which will be stored on hard disc. In such a case it helps to disable all apache loggings. You can check the opened log file from apache using the command: lsof &#124;grep [...]<div style="clear: both;">
<strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li>
<li><a href='http://technitip.net/apache-tuning-part-3' rel='bookmark' title='Apache Tuning Part 3'>Apache Tuning Part 3</a></li>
<li><a href='http://technitip.net/howto-restart-apache-graceful' rel='bookmark' title='Howto Restart Apache Graceful'>Howto Restart Apache Graceful</a></li>
</ol></div>]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s assume your web server has high disc IO. Every access to a .PHP, .HTML, .JPG, .GIF, etc wil cause a log entry which will be stored on hard disc. In such a case it helps to <strong>disable all apache loggings</strong>.</p>
<p>You can check the opened log file from apache using the command:</p>
<pre>lsof |grep apache|grep log</pre>
<p>Oh yes, if you serve lot&#8217;s of domains on your server this list will be quite long. To disable logging just uncomment the corresponding lines e.g. in your virtual host definition:</p>
<pre>#ErrorLog /var/log/apachd2/mydonain.de-error_log

#CustomLog /var/log/apache2/mydomain.de-access_log combined</pre>
<p>Afterwards check your apace configuration for errors:</p>
<pre>apache2ctl -t</pre>
<p>In case of syntax OK just restart your apache server:</p>
<pre>apache2ctl -k graceful</pre>
<p>This command is qute because it does a &#8220;graceful&#8221; restart without anoying users accesing your server right now.</p>
<p><strong>Hint</strong></p>
<p>How to check if my disc IO is high?</p>
<p>Use the command &#8220;vmstat 1&#8243; and check the section &#8220;IO&#8221; (what else&#8230;). You will see bi and bo which means blocks received and blocks sent. In case the numbers are high, you will have high disc IO.</p>
<pre>procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
0  0 659476  41604   8732 347304    3    3    37    41   20   14 19  7 58 16
3  0 659476  41604   8732 347336    0    0     0     0  410  314  7  0 93  0
0  0 659476  41464   8740 347328    0    0     0   424  522  321 11  1 86  2</pre>


<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fapache-tuning-part-2&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div style="clear: both;"><p><strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/apache-tuning-part-1' rel='bookmark' title='Apache Tuning Part 1'>Apache Tuning Part 1</a></li>
<li><a href='http://technitip.net/apache-tuning-part-3' rel='bookmark' title='Apache Tuning Part 3'>Apache Tuning Part 3</a></li>
<li><a href='http://technitip.net/howto-restart-apache-graceful' rel='bookmark' title='Howto Restart Apache Graceful'>Howto Restart Apache Graceful</a></li>
</ol></p></div>]]></content:encoded>
			<wfw:commentRss>http://technitip.net/apache-tuning-part-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Tuning Part 1</title>
		<link>http://technitip.net/apache-tuning-part-1</link>
		<comments>http://technitip.net/apache-tuning-part-1#comments</comments>
		<pubDate>Tue, 30 Dec 2008 10:44:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[tuning]]></category>

		<guid isPermaLink="false">http://planlos.org/~harry/php/?p=32</guid>
		<description><![CDATA[This article applies to apache version 2.2.3 also it will work for other versions. Apache needs a lot of memory, this will decrease performance on a machine with e.g. 1 GByte memory and about 60 users accessing the server simultaneously a lot. There is a simply method to save memory: disable all unused modules. Yes, [...]<div style="clear: both;">
<strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li>
<li><a href='http://technitip.net/apache-tuning-part-3' rel='bookmark' title='Apache Tuning Part 3'>Apache Tuning Part 3</a></li>
<li><a href='http://technitip.net/howto-restart-apache-graceful' rel='bookmark' title='Howto Restart Apache Graceful'>Howto Restart Apache Graceful</a></li>
</ol></div>]]></description>
			<content:encoded><![CDATA[<p>This article applies to apache version 2.2.3 also it will work for other versions.</p>
<p>Apache needs a lot of memory, this will decrease performance on a machine with e.g. 1 GByte memory and about 60 users accessing the server simultaneously a lot. There is a simply method to save memory: <strong>disable all unused modules</strong>. Yes, it really helps!</p>
<p>Why does it help? Because every apache process started &#8211; and a lot will be started when several users are accessing the server &#8211; will load all enabled modules.</p>
<p>To get an overview how much memory is consumed by the modules use the command</p>
<pre>lsof | grep apache | grep modules</pre>
<p>Using this command you will also see which modules consumes much memory.</p>
<p>In my case only the following modules are used:</p>
<ul>
<li>actions.load</li>
<li>authz_default.load</li>
<li>authn_file.load</li>
<li>auth_basic.load</li>
<li>authz_user.load</li>
<li>env.load</li>
<li>mime.load</li>
<li>rewrite.load</li>
<li>userdir.load</li>
<li>alias.load</li>
<li>authz_host.load</li>
<li>deflate.load</li>
<li>expires.load</li>
<li>negotiation.load</li>
<li>setenvif.load</li>
<li>headers.load</li>
<li>speling.load</li>
<li>cgi.load</li>
<li>dir.load</li>
<li>include.load</li>
<li>php5.load</li>
</ul>
<p>Modules which are not needed are disabled using the command</p>
<pre>a2dismod &lt;module_name&gt;</pre>


<div id="facebook_like"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Ftechnitip.net%2Fapache-tuning-part-1&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:80px;" allowTransparency="true"></iframe></div><div style="clear: both;"><p><strong>Related posts:</strong><ol>
<li><a href='http://technitip.net/apache-tuning-part-2' rel='bookmark' title='Apache Tuning Part 2'>Apache Tuning Part 2</a></li>
<li><a href='http://technitip.net/apache-tuning-part-3' rel='bookmark' title='Apache Tuning Part 3'>Apache Tuning Part 3</a></li>
<li><a href='http://technitip.net/howto-restart-apache-graceful' rel='bookmark' title='Howto Restart Apache Graceful'>Howto Restart Apache Graceful</a></li>
</ol></p></div>]]></content:encoded>
			<wfw:commentRss>http://technitip.net/apache-tuning-part-1/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

